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

querying with values in combo boxes

Status
Not open for further replies.

chatfield

Technical User
Joined
May 4, 2001
Messages
8
Location
US
I have a form that is bound to a query. I would like to select a specific record on the form where the values of three of the query fields, e.g., A, B and C, are equal to the values of three combo boxes on the form.

Can you help me?
 
Try this SQL example. Update with your table name and field names:
Select A.*
FROM tblYourTableName as A
WHERE ((A.A = [Forms]![frmYourFormName]![ComboA]) AND
(A.B = [Forms]![frmYourFormName]![ComboB]) AND
(A.C = [Forms]![frmYourFormName]![ComboC]));

This will select the records using the values from the combobox's.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top