find record based on cbo box

kbreiss

Registered User.
Local time
Today, 18:34
Joined
Oct 1, 2002
Messages
228
I have a combo box that displays LastName FirstName.

If I have two people with the same lastname it finds the first one in the table w/ that last name. Please help with my code so it searches by firstname and last name. Thanks in advance.

Kacy

' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Contact_LastName] = '" & Me![cboContact] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
________
Married woman live
 
Last edited:
The parameter you pass to FindFirst is a 'WHERE CLAUSE' without 'WHERE'.. so you can have 'last_name = lastname_TB and first_name = Firstname_TB'
 
I'm not for sure how to write that code up...what is the ( 'last_name = lastname_TB and first_name = Firstname_TB') TB stand for? Thanks again
________
Galleria Ferrari
 
Last edited:
kbreiss, I am attaching a small sample database that will do exactly what you need. The form works through 2 queries, 1 query used by the Master form is simply a shell for the Master form, the 2nd query is used by the results form. I added 2 text fields to search through (First Name and Last Name), the results form will display the results. Note that the paremeters passed on to the results page are built in to the results query and were created using the Creteria wizard built in to the query tool. Let me know if you need further assistance.

Godofhell: www.kavalpewter.com
 

Attachments

Any way you could save the sample database in Access 97 format? I'm having trouble opening it. Thanks.
________
Anal Hardcore
 
Last edited:

Users who are viewing this thread

Back
Top Bottom