P
Peter Wright via AccessMonster.com
From my main form, I have a pop-up form to enter JO# to find a JO. Once
you type in the JO# in the text box and click the submit button, it should
find the record on the main form that matches the JO entered. But, my code
is not working.
Can someone please help?
The "TextJO" is the name of a text box on my main
form................Here's my code:
Private Sub Command0_Click()
Private Sub TextJO_AfterUpdate()
Dim rs As Object
Set rst = Forms!frmEdit.RecordsetClone
With Forms!frmEdit.RecordsetClone
'Set rs = Me.RecordsetClone
' rs.FindFirst "[JobOrder] = " & Str(Nz(Me![TextJO], 0))
rs.FindFirst "JobOrder= " & [TextJO] & " ' "
Me.Bookmark = rs.Bookmark
If Not .NoMatch Then
Forms!frmEdit.Bookmark = .Bookmark
End If
End With
End Sub
Thanks,
Peter
you type in the JO# in the text box and click the submit button, it should
find the record on the main form that matches the JO entered. But, my code
is not working.
Can someone please help?
The "TextJO" is the name of a text box on my main
form................Here's my code:
Private Sub Command0_Click()
Private Sub TextJO_AfterUpdate()
Dim rs As Object
Set rst = Forms!frmEdit.RecordsetClone
With Forms!frmEdit.RecordsetClone
'Set rs = Me.RecordsetClone
' rs.FindFirst "[JobOrder] = " & Str(Nz(Me![TextJO], 0))
rs.FindFirst "JobOrder= " & [TextJO] & " ' "
Me.Bookmark = rs.Bookmark
If Not .NoMatch Then
Forms!frmEdit.Bookmark = .Bookmark
End If
End With
End Sub
Thanks,
Peter