Visual Basic - Getting the field:PartNum of an Assembly Seq

I can't get this to work. It says FIND is not declared ....as if it does not recognize it as a command.

Any other ideas?

--- In vantage@yahoogroups.com, "Dines, Tim" <tdines@...> wrote:
>
> I think this will work if I remember correctly. It has been a while.
>
>
>
> FIND jobNumber
>
> WHERE laborDtl.jobnumber = xxx
>
> EXCLUSIVE-LOCK NO-ERROR.
>
>
>
> IF AVAILABLE jobNumber THEN ASSIGN laborDtl.number01 = yyy (this is your partnumber).
>
>
>
>
>
> Tim Dines
>
> Information Technology
>
> Steel Parts Manufacturing, Inc.
>
> 801 Berryman Pike
>
> Tipton, IN 46072
>
> Direct: 765-675-5201
>
> Cell: 765-437-1402
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
> Sent: Monday, February 08, 2010 12:24 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq
>
>
>
>
>
> Do you have an example of the update statement?
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@> wrote:
> >
> > Can you use an update statement and put this value in labordtl.number01?
> >
> >
> >
> > Tim Dines
> >
> > Information Technology
> >
> > Steel Parts Manufacturing, Inc.
> >
> > 801 Berryman Pike
> >
> > Tipton, IN 46072
> >
> > Direct: 765-675-5201
> >
> > Cell: 765-437-1402
> >
> >
> >
> > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> > Sent: Monday, February 08, 2010 10:59 AM
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq
> >
> >
> >
> >
> >
> > Tim,
> >
> > I got it to work. Thanks for your help! I have a new problem though. I can get the correct part number from the assembly to display but I am having trouble adding it to the laborDtl table.
> >
> > This works:
> >
> > messagebox.show("PartNum=" & assmpart)
> >
> > This crashes and closes MES:
> >
> > laborDtl_Dataview(x)("Character01") = AssmPart
> >
> > The complete code:
> >
> > dim x as integer
> > dim dataMax as integer
> > dataMax = LaborDtl_DataView.Count
> > if dataMax > -1 then
> > for x = 0 to dataMax
> > Dim JobAssmAdapter As JobAsmSearchAdapter = New JobAsmSearchAdapter(MESMenu)
> > JobAssmAdapter.BOConnect()
> > dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> > dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> > dim JobAssm as boolean = JobAssmAdapter.GetByID(jobNumb, assySeq)
> > dim AssmPart as string = JobAssmAdapter.JobAsmSearchData.Tables("JobAsmbl").Rows(0)("PartNum")
> > JobAssmAdapter.Dispose()
> > laborDtl_Dataview(x)("Character01") = AssmPart
> > 'messagebox.show("PartNum=" & assmpart)
> > next x
> > end if
> >
> > Jeff Sanders
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "jeffery_p_sanders" <jps@> wrote:
> > >
> > > Tim,
> > >
> > > I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.
> > >
> > > Thanks anyway,
> > > Jeff Sanders
> > >
> > >
> > > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@> wrote:
> > > >
> > > > I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
> > > >
> > > >
> > > >
> > > > Tim Dines
> > > >
> > > > Information Technology
> > > >
> > > > Steel Parts Manufacturing, Inc.
> > > >
> > > > 801 Berryman Pike
> > > >
> > > > Tipton, IN 46072
> > > >
> > > > Direct: 765-675-5201
> > > >
> > > > Cell: 765-437-1402
> > > >
> > > >
> > > >
> > > > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> > > > Sent: Friday, February 05, 2010 11:02 AM
> > > > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> > > > Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Hello all,
> > > >
> > > > Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
> > > >
> > > > What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> > > > -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
> > > >
> > > > Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
> > > >
> > > > Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> > > > '** Argument Properties and Uses **
> > > > 'LaborDtl_DataView(0)("[FieldName]")
> > > > 'args.ListChangedType, args.NewIndex, args.OldIndex
> > > > 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> > > > 'Add Event Handler Code
> > > > dim x as integer
> > > > dim dataMax as integer
> > > > dataMax = LaborDtl_DataView.Count
> > > > if dataMax > -1 then
> > > > for x = 0 to dataMax
> > > > dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> > > > dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> > > > Messagebox.show("AssemblySeq=" & str$(assySeq))
> > > > Messagebox.show(" JobNum=" & jobNumb)
> > > > next x
> > > > end if
> > > > End Sub
> > > >
> > > > Watch the word wrap.
> > > >
> > > > Thanks in advance,
> > > > Jeff Sanders
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Hello all,

Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?

What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
-> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.

Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):

Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
'** Argument Properties and Uses **
'LaborDtl_DataView(0)("[FieldName]")
'args.ListChangedType, args.NewIndex, args.OldIndex
'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
'Add Event Handler Code
dim x as integer
dim dataMax as integer
dataMax = LaborDtl_DataView.Count
if dataMax > -1 then
for x = 0 to dataMax
dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
Messagebox.show("AssemblySeq=" & str$(assySeq))
Messagebox.show(" JobNum=" & jobNumb)
next x
end if
End Sub

Watch the word wrap.

Thanks in advance,
Jeff Sanders
I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.



Tim Dines

Information Technology

Steel Parts Manufacturing, Inc.

801 Berryman Pike

Tipton, IN 46072

Direct: 765-675-5201

Cell: 765-437-1402



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
Sent: Friday, February 05, 2010 11:02 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq





Hello all,

Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?

What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
-> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.

Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):

Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
'** Argument Properties and Uses **
'LaborDtl_DataView(0)("[FieldName]")
'args.ListChangedType, args.NewIndex, args.OldIndex
'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
'Add Event Handler Code
dim x as integer
dim dataMax as integer
dataMax = LaborDtl_DataView.Count
if dataMax > -1 then
for x = 0 to dataMax
dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
Messagebox.show("AssemblySeq=" & str$(assySeq))
Messagebox.show(" JobNum=" & jobNumb)
next x
end if
End Sub

Watch the word wrap.

Thanks in advance,
Jeff Sanders





[Non-text portions of this message have been removed]
Tim,

I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.

Thanks anyway,
Jeff Sanders


--- In vantage@yahoogroups.com, "Dines, Tim" <tdines@...> wrote:
>
> I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
>
>
>
> Tim Dines
>
> Information Technology
>
> Steel Parts Manufacturing, Inc.
>
> 801 Berryman Pike
>
> Tipton, IN 46072
>
> Direct: 765-675-5201
>
> Cell: 765-437-1402
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
> Sent: Friday, February 05, 2010 11:02 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
>
>
>
>
>
> Hello all,
>
> Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
>
> What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
>
> Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
>
> Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> '** Argument Properties and Uses **
> 'LaborDtl_DataView(0)("[FieldName]")
> 'args.ListChangedType, args.NewIndex, args.OldIndex
> 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> 'Add Event Handler Code
> dim x as integer
> dim dataMax as integer
> dataMax = LaborDtl_DataView.Count
> if dataMax > -1 then
> for x = 0 to dataMax
> dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> Messagebox.show("AssemblySeq=" & str$(assySeq))
> Messagebox.show(" JobNum=" & jobNumb)
> next x
> end if
> End Sub
>
> Watch the word wrap.
>
> Thanks in advance,
> Jeff Sanders
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I do this all the time...link to the part table....







M. Manasa Reddy

manasa@... <mailto:manasa@...>

800.852.2325

630.806.2000 ofc

630.806.2001 fax

www.weldcoa.com

________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
Sent: Friday, February 05, 2010 1:04 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq





Tim,

I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.

Thanks anyway,
Jeff Sanders

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@...> wrote:
>
> I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
>
>
>
> Tim Dines
>
> Information Technology
>
> Steel Parts Manufacturing, Inc.
>
> 801 Berryman Pike
>
> Tipton, IN 46072
>
> Direct: 765-675-5201
>
> Cell: 765-437-1402
>
>
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> Sent: Friday, February 05, 2010 11:02 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
>
>
>
>
>
> Hello all,
>
> Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
>
> What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
>
> Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
>
> Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> '** Argument Properties and Uses **
> 'LaborDtl_DataView(0)("[FieldName]")
> 'args.ListChangedType, args.NewIndex, args.OldIndex
> 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> 'Add Event Handler Code
> dim x as integer
> dim dataMax as integer
> dataMax = LaborDtl_DataView.Count
> if dataMax > -1 then
> for x = 0 to dataMax
> dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> Messagebox.show("AssemblySeq=" & str$(assySeq))
> Messagebox.show(" JobNum=" & jobNumb)
> next x
> end if
> End Sub
>
> Watch the word wrap.
>
> Thanks in advance,
> Jeff Sanders
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Sorry not the right response to your question...someone else's...



Partnum field is in the JobAsmbl table....try that table...







M. Manasa Reddy

manasa@... <mailto:manasa@...>

800.852.2325

630.806.2000 ofc

630.806.2001 fax

www.weldcoa.com

________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Manasa Reddy
Sent: Friday, February 05, 2010 1:34 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq





I do this all the time...link to the part table....

M. Manasa Reddy

manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa@... <mailto:manasa%40weldcoa.com> >

800.852.2325

630.806.2000 ofc

630.806.2001 fax

www.weldcoa.com

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
Sent: Friday, February 05, 2010 1:04 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq

Tim,

I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.

Thanks anyway,
Jeff Sanders

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@...> wrote:
>
> I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
>
>
>
> Tim Dines
>
> Information Technology
>
> Steel Parts Manufacturing, Inc.
>
> 801 Berryman Pike
>
> Tipton, IN 46072
>
> Direct: 765-675-5201
>
> Cell: 765-437-1402
>
>
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> Sent: Friday, February 05, 2010 11:02 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
>
>
>
>
>
> Hello all,
>
> Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
>
> What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
>
> Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
>
> Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> '** Argument Properties and Uses **
> 'LaborDtl_DataView(0)("[FieldName]")
> 'args.ListChangedType, args.NewIndex, args.OldIndex
> 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> 'Add Event Handler Code
> dim x as integer
> dim dataMax as integer
> dataMax = LaborDtl_DataView.Count
> if dataMax > -1 then
> for x = 0 to dataMax
> dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> Messagebox.show("AssemblySeq=" & str$(assySeq))
> Messagebox.show(" JobNum=" & jobNumb)
> next x
> end if
> End Sub
>
> Watch the word wrap.
>
> Thanks in advance,
> Jeff Sanders
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Try what I have below I did not test but it should work. You will also have to add the JobAsmSearch dlls under custom in the assembly reference manager.

After your event trigger:

Dim LaborDtl As EpidataView = Ctype(Otrans.EpiDataViews("LaborDtl"),EpiDataView
Dim jobNum As String = LaborDtl.dataView(LaborDtl.Row)("JobNum")
Dim assemblySeq As Integer = LaborDtl.dataView(LaborDtl.Row)("AssemblySeq")

Dim JobAssmAdapter As JobAsmSearchAdapter = New JobAsmSearchAdapter([UIForm]) '//~~~UIForm is the form you are customizing

JobAssmAdapter.BOConnect()
Dim JobAssm As Boolean = JobAssmAdapter.GetByID(jobNum, assemblySeq)
Dim AssmPart As String
AssmPart = JobAssmAdapter.JobAsmSearchData.Tables("JobAsmbl").Rows(0)("PartNum")

JobAssmAdapter.Dispose()

'//~~~ AssmPart will be your part number'// ~~~I am not 100% sure it is JobAsmSearchData it might be called something else for the data table.

--- In vantage@yahoogroups.com, "jeffery_p_sanders" <jps@...> wrote:
>
> Tim,
>
> I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.
>
> Thanks anyway,
> Jeff Sanders
>
>
> --- In vantage@yahoogroups.com, "Dines, Tim" <tdines@> wrote:
> >
> > I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
> >
> >
> >
> > Tim Dines
> >
> > Information Technology
> >
> > Steel Parts Manufacturing, Inc.
> >
> > 801 Berryman Pike
> >
> > Tipton, IN 46072
> >
> > Direct: 765-675-5201
> >
> > Cell: 765-437-1402
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
> > Sent: Friday, February 05, 2010 11:02 AM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
> >
> >
> >
> >
> >
> > Hello all,
> >
> > Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
> >
> > What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> > -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
> >
> > Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
> >
> > Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> > '** Argument Properties and Uses **
> > 'LaborDtl_DataView(0)("[FieldName]")
> > 'args.ListChangedType, args.NewIndex, args.OldIndex
> > 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> > 'Add Event Handler Code
> > dim x as integer
> > dim dataMax as integer
> > dataMax = LaborDtl_DataView.Count
> > if dataMax > -1 then
> > for x = 0 to dataMax
> > dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> > dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> > Messagebox.show("AssemblySeq=" & str$(assySeq))
> > Messagebox.show(" JobNum=" & jobNumb)
> > next x
> > end if
> > End Sub
> >
> > Watch the word wrap.
> >
> > Thanks in advance,
> > Jeff Sanders
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
Sorry again...wrong email...I am going home early...TGIF!



I'm taking vantage yahoo groups off my list for a while!!!







M. Manasa Reddy

manasa@... <mailto:manasa@...>

800.852.2325

630.806.2000 ofc

630.806.2001 fax

www.weldcoa.com

________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Manasa Reddy
Sent: Friday, February 05, 2010 1:37 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq





Sorry not the right response to your question...someone else's...

Partnum field is in the JobAsmbl table....try that table...

M. Manasa Reddy

manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa@... <mailto:manasa%40weldcoa.com> >

800.852.2325

630.806.2000 ofc

630.806.2001 fax

www.weldcoa.com

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of Manasa Reddy
Sent: Friday, February 05, 2010 1:34 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq

I do this all the time...link to the part table....

M. Manasa Reddy

manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa%40weldcoa.com> <mailto:manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa%40weldcoa.com> >

800.852.2325

630.806.2000 ofc

630.806.2001 fax

www.weldcoa.com

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
Sent: Friday, February 05, 2010 1:04 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq

Tim,

I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.

Thanks anyway,
Jeff Sanders

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@...> wrote:
>
> I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
>
>
>
> Tim Dines
>
> Information Technology
>
> Steel Parts Manufacturing, Inc.
>
> 801 Berryman Pike
>
> Tipton, IN 46072
>
> Direct: 765-675-5201
>
> Cell: 765-437-1402
>
>
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> Sent: Friday, February 05, 2010 11:02 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
>
>
>
>
>
> Hello all,
>
> Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
>
> What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
>
> Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
>
> Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> '** Argument Properties and Uses **
> 'LaborDtl_DataView(0)("[FieldName]")
> 'args.ListChangedType, args.NewIndex, args.OldIndex
> 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> 'Add Event Handler Code
> dim x as integer
> dim dataMax as integer
> dataMax = LaborDtl_DataView.Count
> if dataMax > -1 then
> for x = 0 to dataMax
> dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> Messagebox.show("AssemblySeq=" & str$(assySeq))
> Messagebox.show(" JobNum=" & jobNumb)
> next x
> end if
> End Sub
>
> Watch the word wrap.
>
> Thanks in advance,
> Jeff Sanders
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Tim,

I think I am missing something. I added this code:

dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
dim jobNumb as string = laborDtl_Dataview(x)("JobNum")

Dim JobAssmAdapter As JobAsmSearchAdapter = New JobAsmSearchAdapter([MESMenu])
'//~~~UIForm is the form you are customizing
JobAssmAdapter.BOConnect()
Dim JobAssm As Boolean = JobAssmAdapter.GetByID(jobNumb, assySeq)
Dim AssmPart As String
AssmPart = JobAssmAdapter.JobAsmSearchData.Tables("JobAsmbl").Rows(0)("PartNum")
JobAssmAdapter.Dispose()

It returns this when testing the code:

Error: BC30652 - line 93 (223) - Reference required to assembly 'Epicor.Mfg.IF.IJobAsmSearch, Version=9.4.504.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992' containing the type 'Epicor.Mfg.BO.JobAsmSearchDataSet'. Add one to your project.

I went to the Custom Assembly Reference Manager and added the JobAsmSearch.

I noticed you created variable JobAssm but it doesn't seem to be used anywhere. ??

I really appreciate your help on this.

Jeff Sanders
Tim,

I got it to work. Thanks for your help! I have a new problem though. I can get the correct part number from the assembly to display but I am having trouble adding it to the laborDtl table.

This works:

messagebox.show("PartNum=" & assmpart)

This crashes and closes MES:

laborDtl_Dataview(x)("Character01") = AssmPart


The complete code:

dim x as integer
dim dataMax as integer
dataMax = LaborDtl_DataView.Count
if dataMax > -1 then
for x = 0 to dataMax
Dim JobAssmAdapter As JobAsmSearchAdapter = New JobAsmSearchAdapter(MESMenu)
JobAssmAdapter.BOConnect()
dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
dim JobAssm as boolean = JobAssmAdapter.GetByID(jobNumb, assySeq)
dim AssmPart as string = JobAssmAdapter.JobAsmSearchData.Tables("JobAsmbl").Rows(0)("PartNum")
JobAssmAdapter.Dispose()
laborDtl_Dataview(x)("Character01") = AssmPart
'messagebox.show("PartNum=" & assmpart)
next x
end if

Jeff Sanders



--- In vantage@yahoogroups.com, "jeffery_p_sanders" <jps@...> wrote:
>
> Tim,
>
> I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.
>
> Thanks anyway,
> Jeff Sanders
>
>
> --- In vantage@yahoogroups.com, "Dines, Tim" <tdines@> wrote:
> >
> > I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
> >
> >
> >
> > Tim Dines
> >
> > Information Technology
> >
> > Steel Parts Manufacturing, Inc.
> >
> > 801 Berryman Pike
> >
> > Tipton, IN 46072
> >
> > Direct: 765-675-5201
> >
> > Cell: 765-437-1402
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
> > Sent: Friday, February 05, 2010 11:02 AM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
> >
> >
> >
> >
> >
> > Hello all,
> >
> > Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
> >
> > What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> > -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
> >
> > Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
> >
> > Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> > '** Argument Properties and Uses **
> > 'LaborDtl_DataView(0)("[FieldName]")
> > 'args.ListChangedType, args.NewIndex, args.OldIndex
> > 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> > 'Add Event Handler Code
> > dim x as integer
> > dim dataMax as integer
> > dataMax = LaborDtl_DataView.Count
> > if dataMax > -1 then
> > for x = 0 to dataMax
> > dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> > dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> > Messagebox.show("AssemblySeq=" & str$(assySeq))
> > Messagebox.show(" JobNum=" & jobNumb)
> > next x
> > end if
> > End Sub
> >
> > Watch the word wrap.
> >
> > Thanks in advance,
> > Jeff Sanders
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
Can you use an update statement and put this value in labordtl.number01?



Tim Dines

Information Technology

Steel Parts Manufacturing, Inc.

801 Berryman Pike

Tipton, IN 46072

Direct: 765-675-5201

Cell: 765-437-1402



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
Sent: Monday, February 08, 2010 10:59 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq





Tim,

I got it to work. Thanks for your help! I have a new problem though. I can get the correct part number from the assembly to display but I am having trouble adding it to the laborDtl table.

This works:

messagebox.show("PartNum=" & assmpart)

This crashes and closes MES:

laborDtl_Dataview(x)("Character01") = AssmPart

The complete code:

dim x as integer
dim dataMax as integer
dataMax = LaborDtl_DataView.Count
if dataMax > -1 then
for x = 0 to dataMax
Dim JobAssmAdapter As JobAsmSearchAdapter = New JobAsmSearchAdapter(MESMenu)
JobAssmAdapter.BOConnect()
dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
dim JobAssm as boolean = JobAssmAdapter.GetByID(jobNumb, assySeq)
dim AssmPart as string = JobAssmAdapter.JobAsmSearchData.Tables("JobAsmbl").Rows(0)("PartNum")
JobAssmAdapter.Dispose()
laborDtl_Dataview(x)("Character01") = AssmPart
'messagebox.show("PartNum=" & assmpart)
next x
end if

Jeff Sanders

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "jeffery_p_sanders" <jps@...> wrote:
>
> Tim,
>
> I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.
>
> Thanks anyway,
> Jeff Sanders
>
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@> wrote:
> >
> > I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
> >
> >
> >
> > Tim Dines
> >
> > Information Technology
> >
> > Steel Parts Manufacturing, Inc.
> >
> > 801 Berryman Pike
> >
> > Tipton, IN 46072
> >
> > Direct: 765-675-5201
> >
> > Cell: 765-437-1402
> >
> >
> >
> > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> > Sent: Friday, February 05, 2010 11:02 AM
> > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
> >
> >
> >
> >
> >
> > Hello all,
> >
> > Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
> >
> > What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> > -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
> >
> > Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
> >
> > Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> > '** Argument Properties and Uses **
> > 'LaborDtl_DataView(0)("[FieldName]")
> > 'args.ListChangedType, args.NewIndex, args.OldIndex
> > 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> > 'Add Event Handler Code
> > dim x as integer
> > dim dataMax as integer
> > dataMax = LaborDtl_DataView.Count
> > if dataMax > -1 then
> > for x = 0 to dataMax
> > dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> > dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> > Messagebox.show("AssemblySeq=" & str$(assySeq))
> > Messagebox.show(" JobNum=" & jobNumb)
> > next x
> > end if
> > End Sub
> >
> > Watch the word wrap.
> >
> > Thanks in advance,
> > Jeff Sanders
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>





[Non-text portions of this message have been removed]
Do you have an example of the update statement?

--- In vantage@yahoogroups.com, "Dines, Tim" <tdines@...> wrote:
>
> Can you use an update statement and put this value in labordtl.number01?
>
>
>
> Tim Dines
>
> Information Technology
>
> Steel Parts Manufacturing, Inc.
>
> 801 Berryman Pike
>
> Tipton, IN 46072
>
> Direct: 765-675-5201
>
> Cell: 765-437-1402
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
> Sent: Monday, February 08, 2010 10:59 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq
>
>
>
>
>
> Tim,
>
> I got it to work. Thanks for your help! I have a new problem though. I can get the correct part number from the assembly to display but I am having trouble adding it to the laborDtl table.
>
> This works:
>
> messagebox.show("PartNum=" & assmpart)
>
> This crashes and closes MES:
>
> laborDtl_Dataview(x)("Character01") = AssmPart
>
> The complete code:
>
> dim x as integer
> dim dataMax as integer
> dataMax = LaborDtl_DataView.Count
> if dataMax > -1 then
> for x = 0 to dataMax
> Dim JobAssmAdapter As JobAsmSearchAdapter = New JobAsmSearchAdapter(MESMenu)
> JobAssmAdapter.BOConnect()
> dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> dim JobAssm as boolean = JobAssmAdapter.GetByID(jobNumb, assySeq)
> dim AssmPart as string = JobAssmAdapter.JobAsmSearchData.Tables("JobAsmbl").Rows(0)("PartNum")
> JobAssmAdapter.Dispose()
> laborDtl_Dataview(x)("Character01") = AssmPart
> 'messagebox.show("PartNum=" & assmpart)
> next x
> end if
>
> Jeff Sanders
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "jeffery_p_sanders" <jps@> wrote:
> >
> > Tim,
> >
> > I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.
> >
> > Thanks anyway,
> > Jeff Sanders
> >
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@> wrote:
> > >
> > > I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
> > >
> > >
> > >
> > > Tim Dines
> > >
> > > Information Technology
> > >
> > > Steel Parts Manufacturing, Inc.
> > >
> > > 801 Berryman Pike
> > >
> > > Tipton, IN 46072
> > >
> > > Direct: 765-675-5201
> > >
> > > Cell: 765-437-1402
> > >
> > >
> > >
> > > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> > > Sent: Friday, February 05, 2010 11:02 AM
> > > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > > Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
> > >
> > >
> > >
> > >
> > >
> > > Hello all,
> > >
> > > Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
> > >
> > > What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> > > -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
> > >
> > > Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
> > >
> > > Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> > > '** Argument Properties and Uses **
> > > 'LaborDtl_DataView(0)("[FieldName]")
> > > 'args.ListChangedType, args.NewIndex, args.OldIndex
> > > 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> > > 'Add Event Handler Code
> > > dim x as integer
> > > dim dataMax as integer
> > > dataMax = LaborDtl_DataView.Count
> > > if dataMax > -1 then
> > > for x = 0 to dataMax
> > > dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> > > dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> > > Messagebox.show("AssemblySeq=" & str$(assySeq))
> > > Messagebox.show(" JobNum=" & jobNumb)
> > > next x
> > > end if
> > > End Sub
> > >
> > > Watch the word wrap.
> > >
> > > Thanks in advance,
> > > Jeff Sanders
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I think this will work if I remember correctly. It has been a while.



FIND jobNumber

WHERE laborDtl.jobnumber = xxx

EXCLUSIVE-LOCK NO-ERROR.



IF AVAILABLE jobNumber THEN ASSIGN laborDtl.number01 = yyy (this is your partnumber).





Tim Dines

Information Technology

Steel Parts Manufacturing, Inc.

801 Berryman Pike

Tipton, IN 46072

Direct: 765-675-5201

Cell: 765-437-1402



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jeffery_p_sanders
Sent: Monday, February 08, 2010 12:24 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq





Do you have an example of the update statement?

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@...> wrote:
>
> Can you use an update statement and put this value in labordtl.number01?
>
>
>
> Tim Dines
>
> Information Technology
>
> Steel Parts Manufacturing, Inc.
>
> 801 Berryman Pike
>
> Tipton, IN 46072
>
> Direct: 765-675-5201
>
> Cell: 765-437-1402
>
>
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> Sent: Monday, February 08, 2010 10:59 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: Visual Basic - Getting the field:PartNum of an Assembly Seq
>
>
>
>
>
> Tim,
>
> I got it to work. Thanks for your help! I have a new problem though. I can get the correct part number from the assembly to display but I am having trouble adding it to the laborDtl table.
>
> This works:
>
> messagebox.show("PartNum=" & assmpart)
>
> This crashes and closes MES:
>
> laborDtl_Dataview(x)("Character01") = AssmPart
>
> The complete code:
>
> dim x as integer
> dim dataMax as integer
> dataMax = LaborDtl_DataView.Count
> if dataMax > -1 then
> for x = 0 to dataMax
> Dim JobAssmAdapter As JobAsmSearchAdapter = New JobAsmSearchAdapter(MESMenu)
> JobAssmAdapter.BOConnect()
> dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> dim JobAssm as boolean = JobAssmAdapter.GetByID(jobNumb, assySeq)
> dim AssmPart as string = JobAssmAdapter.JobAsmSearchData.Tables("JobAsmbl").Rows(0)("PartNum")
> JobAssmAdapter.Dispose()
> laborDtl_Dataview(x)("Character01") = AssmPart
> 'messagebox.show("PartNum=" & assmpart)
> next x
> end if
>
> Jeff Sanders
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "jeffery_p_sanders" <jps@> wrote:
> >
> > Tim,
> >
> > I'm not doing a report. I'm trying to create a customization via Visual Basic. I need the Assembly PartNum added to the LaborDtl table. The LaborDtl table has the job number and assembly sequence. I tried creating a Foreign Key View to the JobAsmbl table but it does not work.
> >
> > Thanks anyway,
> > Jeff Sanders
> >
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "Dines, Tim" <tdines@> wrote:
> > >
> > > I haven't tried what you are doing yet, but I believe you need to get the part number from the JobAsmbl table. If I were doing a report on this, I would do an outer join between this table and labordtl. Hope this helps some.
> > >
> > >
> > >
> > > Tim Dines
> > >
> > > Information Technology
> > >
> > > Steel Parts Manufacturing, Inc.
> > >
> > > 801 Berryman Pike
> > >
> > > Tipton, IN 46072
> > >
> > > Direct: 765-675-5201
> > >
> > > Cell: 765-437-1402
> > >
> > >
> > >
> > > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf Of jeffery_p_sanders
> > > Sent: Friday, February 05, 2010 11:02 AM
> > > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> > > Subject: [Vantage] Visual Basic - Getting the field:PartNum of an Assembly Seq
> > >
> > >
> > >
> > >
> > >
> > > Hello all,
> > >
> > > Does anyone know how to get an assembly's PartNum value from a job number and Assembly Sequence number?
> > >
> > > What I am trying to do is get the PartNum of the Assembly to show up in the Production list shown in the LaborDtls grid control
> > > -> grdLaborDetails. I have the Job Number and Assembly Sequence but need the PartNum of the assembly bound to field Character01. I can't seem to get this to work using a Foreign Key View.
> > >
> > > Here is the code I have so far to display the job number and sequence number of each item shown in the LaborDtl list (which is working):
> > >
> > > Private Sub LaborDtl_DataView_ListChanged(ByVal sender As Object, ByVal args As ListChangedEventArgs)
> > > '** Argument Properties and Uses **
> > > 'LaborDtl_DataView(0)("[FieldName]")
> > > 'args.ListChangedType, args.NewIndex, args.OldIndex
> > > 'ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
> > > 'Add Event Handler Code
> > > dim x as integer
> > > dim dataMax as integer
> > > dataMax = LaborDtl_DataView.Count
> > > if dataMax > -1 then
> > > for x = 0 to dataMax
> > > dim assySeq as int32 = laborDtl_DataView(x)("AssemblySeq")
> > > dim jobNumb as string = laborDtl_Dataview(x)("JobNum")
> > > Messagebox.show("AssemblySeq=" & str$(assySeq))
> > > Messagebox.show(" JobNum=" & jobNumb)
> > > next x
> > > end if
> > > End Sub
> > >
> > > Watch the word wrap.
> > >
> > > Thanks in advance,
> > > Jeff Sanders
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]