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?
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]
>