I used this code on text on my form to seach for my customer information on my customers form and is working very good.the problem is that only I can write the (lastname) of my customer and I obtain the information.I would like to know can I add anything to same code and find same record by write anything from the customer like instead of write lastname only, I want to write firstname, date of brith , ssn....etc.
pleasr help.
Dim rs As DAO.Recordset
If Not IsNull(Me.cbomoveto) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[lastname] = """ & Me.cbomoveto & """"
If rs.NoMatch Then
MsgBox "CUSTOMER NOT FOUND ", vbExclamation, "Customer'S Form"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
pleasr help.
Dim rs As DAO.Recordset
If Not IsNull(Me.cbomoveto) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[lastname] = """ & Me.cbomoveto & """"
If rs.NoMatch Then
MsgBox "CUSTOMER NOT FOUND ", vbExclamation, "Customer'S Form"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If