Nope still struggling with it.

Maybe it's simpler now to work this search out.  What i'm trying to 
do is this:  When the Doneby barcode is scanned for the first time 
it populated Doneby & txtStart Fields.  When the Doneby is scanned 
for the second time, i want to make sure it comes back THIS specific 
record to populate the txtStop field.  Any ideas?

thanks Neil.  - Clay


Private Sub Doneby_AfterUpdate()
If IsNull(Me.txtStart) Then
        Forms![SCANFORM]!txtStart.SetFocus
        Forms![SCANFORM]!txtStart = Now()
 
    Else
        Forms![SCANFORM]!txtStop.SetFocus
        Forms![SCANFORM]!txtStop = Now()
    End If

End Sub

Private Sub txtStart_Enter()
DoCmd.OpenForm "Splash_subform2", acNormal, , , , acWindowNormal
Me.TimerInterval = 5000
DoCmd.Close acForm, "frmSplash2_subform"

End Sub

Private Sub txtStop_Enter()
DoCmd.OpenForm "Splash_subform", acNormal, , , , acWindowNormal
Me.TimerInterval = 5000
DoCmd.Close acForm, "frmSplash_subform"
End Sub

Private Sub txtStop_GotFocus()
DoCmd.GoToRecord , , acNewRec
Forms![SCANFORM]!ReworkNo.SetFocus

End Sub


--- In AccessDevelopers@yahoogroups.com, "Squires, Neil" 
<[EMAIL PROTECTED]> wrote:
>
> Did you get it figured out?
> 
> 
> -----Original Message-----
> From: AccessDevelopers@yahoogroups.com
> [mailto:[EMAIL PROTECTED] Behalf Of 
brazilianbound
> Sent: Friday, December 09, 2005 12:44 PM
> To: AccessDevelopers@yahoogroups.com
> Subject: [AccessDevelopers] Re: Method 'Item' of object 'Forms' 
failed
> 
> 
> Hey Neil
> 
> It was this piece that was throwing it off.
> 
> Private Sub Doneby_BeforeUpdate()
> If IsNull(Forms![SCANFORM]!txtStop) Then
>     Application.Echo = False
>     Doneby.Enabled = True
>     Doneby.SetFocus
>     DoCmd.FindRecord txtFind
>     txtFind.SetFocus
>     Doneby.Enabled = False
> 
> End Sub
> 
> 
> --- In AccessDevelopers@yahoogroups.com, "Squires, Neil" 
> <[EMAIL PROTECTED]> wrote:
> >
> > Not sure what you are doing..... but you could try this
> > 
> > 
> > dim intStrLength as integer
> > intStrLength =Len(MyData)
> > 
> > If IsNumeric(MyData) Then   ' data is all numeric data
> > 
> >    Select Case intStrLength   ' how long is the numeric string?
> > 
> >     (HERE IS WHERE IT HANGS UP)
> >     
> >     Case 4
> > 
> > 
> > -----Original Message-----
> > From: AccessDevelopers@yahoogroups.com
> > [mailto:[EMAIL PROTECTED] Behalf Of 
> brazilianbound
> > Sent: Friday, December 09, 2005 12:34 PM
> > To: AccessDevelopers@yahoogroups.com
> > Subject: [AccessDevelopers] Method 'Item' of object 'Forms' 
failed
> > 
> > 
> > 
> > 
> > I don't know what is going on.  It was working fine.  Here is 
the 
> > Wedge code it's hanging on.  Below that is my new streamlined 
> code, 
> > taking some advice to consolidate time & date to one field.  I 
> don't 
> > see any conflict that i know of, maybe you all can see something 
> i'm 
> > missing.
> > 
> > Thanks, Clay
> > 
> > 
> > Function GetWedgeData()
> > 
> > ' Declare variables
> > Dim ChannelNumber, MyData As Variant
> > 
> > ' open a link to WinWedge
> > ChannelNumber = DDEInitiate("WinWedge", "Com1")
> > ' get data from field(1)
> > MyData = DDERequest(ChannelNumber, "FIELD(1)")
> > 
> > ' terminate the link
> > DDETerminate ChannelNumber
> > ' if no data then quit
> > If Len(MyData) = 0 Then Exit Function
> > 
> > 'Data from Field(1) in WinWedge is now in the variable "MyData". 
> The 
> > following code sets the value of Textbox1 on Form1 to display 
the 
> > current WinWedge data.
> > 
> > If IsNumeric(MyData) Then   ' data is all numeric data
> >    Select Case Len(MyData)  ' how long is the numeric string?
> > 
> >     (HERE IS WHERE IT HANGS UP)
> >     
> >     Case 4
> >         Forms![SCANFORM]!ProcessID.SetFocus
> >         Forms![SCANFORM]!ProcessID.Text = MyData
> >     Case 5
> >         Forms![SCANFORM]!ReworkNo.SetFocus
> >         Forms![SCANFORM]!ReworkNo.Text = MyData
> >     
> >    End Select
> > Else   ' data is a text string - assume that it is initials of 
> > operator
> >         Forms![SCANFORM]!Doneby.SetFocus
> >         Forms![SCANFORM]!Doneby.Text = MyData
> >        
> >      
> > End If
> > 
> > End Function
> > 
> > __________________________________
> > 
> > Private Sub Doneby_AfterUpdate()
> > If IsNull(Me.txtStart) Then
> >         Forms![SCANFORM]!txtStart.SetFocus
> >         Forms![SCANFORM]!txtStart = Now()
> >  
> >     Else
> >         Forms![SCANFORM]!txtStop.SetFocus
> >         Forms![SCANFORM]!txtStop = Now()
> >     End If
> > _____
> >     
> > End Sub
> > 
> > Private Sub Doneby_BeforeUpdate()
> > If IsNull(Forms![SCANFORM]!txtStop) Then
> >     Application.Echo = False
> >     Doneby.Enabled = True
> >     Doneby.SetFocus
> >     DoCmd.FindRecord txtFind
> >     txtFind.SetFocus
> >     Doneby.Enabled = False
> > 
> > End Sub
> > _______
> > 
> > Private Sub txtStart_Enter()
> > DoCmd.OpenForm "Splash_subform2", acNormal, , , , acWindowNormal
> > Me.TimerInterval = 5000
> > DoCmd.Close acForm, "frmSplash2_subform"
> > 
> > End Sub
> > __________
> > 
> > Private Sub txtStop_Enter()
> > DoCmd.OpenForm "Splash_subform", acNormal, , , , acWindowNormal
> > Me.TimerInterval = 5000
> > DoCmd.Close acForm, "frmSplash_subform"
> > End Sub
> > ________
> > 
> > Private Sub txtStop_GotFocus()
> > DoCmd.GoToRecord , , acNewRec
> > Forms![SCANFORM]!ReworkNo.SetFocus
> > 
> > End Sub
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Please zip all files prior to uploading to Files section. 
> > Yahoo! Groups Links
> >
> 
> 
> 
> 
> 
> 
> 
> 
> Please zip all files prior to uploading to Files section. 
> Yahoo! Groups Links
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to