Hi I have a problem, that’s been getting to me for ages. I’m trying to code a combo box to be a search field. I have used the following code successfully over loads of forms….where I’m searching for a primary key (which is a number)
Private Sub Combo237_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[OrderNo] = " & Str(Nz(Me![Combo237], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
However I really need to search for a text field..is the above only for number fields or primary keys???...am really confused…any enlightenment will be gratefully received ..
Thanks a lot in advance for any help!!
S
Private Sub Combo237_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[OrderNo] = " & Str(Nz(Me![Combo237], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
However I really need to search for a text field..is the above only for number fields or primary keys???...am really confused…any enlightenment will be gratefully received ..
Thanks a lot in advance for any help!!
S