D
Debbie Wend via AccessMonster.com
I have a text box to type the name or a number for a search to find the
record. The number search is working but NOT the word search. Below is my
code:
Private Sub TextJO_AfterUpdate()
Dim rs As Object
Set rs = Me.RecordsetClone
If Val(Me.TextJO) = 0 Then
'They typed a name
'(Name Search code goes here)
rs.FindFirst "TempName = ' " & [TextJO] & " ' "
Me.Bookmark = rs.Bookmark
Else
'They typed TrackingNo
'(Number Search code goes here)
rs.FindFirst "[TrackingNo] = " & Str(Nz(Me![TextJO], 0))
Me.Bookmark = rs.Bookmark
End If
End Sub
Thanks
Debbie
record. The number search is working but NOT the word search. Below is my
code:
Private Sub TextJO_AfterUpdate()
Dim rs As Object
Set rs = Me.RecordsetClone
If Val(Me.TextJO) = 0 Then
'They typed a name
'(Name Search code goes here)
rs.FindFirst "TempName = ' " & [TextJO] & " ' "
Me.Bookmark = rs.Bookmark
Else
'They typed TrackingNo
'(Number Search code goes here)
rs.FindFirst "[TrackingNo] = " & Str(Nz(Me![TextJO], 0))
Me.Bookmark = rs.Bookmark
End If
End Sub
Thanks
Debbie