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

How to use forms to change a queries criteria

Status
Not open for further replies.

bjc1007

Programmer
Jul 3, 2002
5
US
This might be an easy one, but it's got me stumped.. I have a form with three combo boxes that you select fields from a value list. The choices in each of the boxes change depending on what you selected in the other two boxes. What I want to do is have each of these three boxes tied to a field in a query, and when you make your selections they become the criteria for that field in the query. Is there a relatively painless solution to this problem?
 
Entirely unclear -at least to me. But I think what you are attempting is straightforward. Add the standard 'criteria' expressions to the query - and have them reference the respective combobox. You DO need to usse the 'fully qualified' name(s) of the combo's (form, control ...).

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Sure,

Just change my example of MyForm to your form and MyControl to the control on the form that you want to be the criteria:

Forms![MyForm]!MyControl.Value

Hope this makes sense.

God Bless,
Mike

Yes, I believe in Jesus. ;-)
"Neither is there salvation in any other: for there is none other name under heaven given among men, whereby we must be saved." (Acts 4:12, KJV)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top