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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have RecordsetClone Problem Finding Records

Status
Not open for further replies.

ebizleads

Technical User
Sep 14, 2005
57
US
I'm using this code to find records by last name in my form. It works great until I discovered if I have 2 people named "Jones" it will only return one of these records. Any ideas what I can insert here to solve this?



Dim MyName As DAO.Recordset
Set MyName = Me.RecordsetClone

MyName.FindFirst "[Last Name] = '" & Me.qlastname & "'"

If MyName.NoMatch Then
MsgBox "Name Not Found"
Else
Me.Bookmark = MyName.Bookmark
End If

Thanks!

Ebizleads
 
What do you fancy? Finding by last name and first name? A message box to say that more than one was found? Just an Order By so the user can click next or such like?
 
How are ya ebizleads . . .

Us an [blue]SQL statement with criteria set to LastName[/blue] as the source of the recordset. Then use the [blue]RecordCount[/blue] property to tell if more than one lastname . . .

Calvin.gif
See Ya! . . . . . .
 
I have used a Combo box with a Query input that has added the Last Name, First Name, MiddleInitial and suffix if any and also included the Member or Record number to the same lookup field. Adding the number to the search field will show them separate in the drop down. Simply adding the first name may not work due to the Suffix (Jr., Sr. etc)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top