Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

USE TEXT TO FIND RECORD

Status
Not open for further replies.

gasx

Technical User
Feb 28, 2003
22
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top