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

Query Using Value in Combo Box on Form 1

Status
Not open for further replies.

DeLaMartre

Technical User
Dec 26, 2001
213
US
Is it possible to build a query (the information will be used on a report) which uses the information currently chosen in a combo box on a form.

For instance, in a field on the query entitled, "Agent", Agent=[current value on main form]. (Sorry for the ignorant example)

I am using Access 2000. Any help would be greatly appreciated! Thanks so much for your time.

-Bob in California

 
Hi

yes, this is a common thing to do

provided the form is open at the time the report runs, you just put:

Forms!MyFormName!MyComboBoxName in the criteria of the query, the builder will guide you through this in query designer by the way.

You need to replace the My... names with your own names of course

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thanks so much for your fine lesson, Ken! You are a Great Man!

The number of brilliant, altruistic members of this forum never ceases to amaze me.

Thank you,

-Bob in California

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top