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

vince99

Status
Not open for further replies.

vince99

IS-IT--Management
Mar 1, 2001
63
US
DropDown Combo Box For A query help?

Is there a way to have a drop down box for a query?

What I want to do is set up a select query and have the user decide from a drop down box what he wants to search for.

When the query is started, I would Like the user to select a field, lets say email address, then I would like for a window to pop up where the email address can be entered and searched for...

any thoughts?

thanks
 
Hi,
Why don't you use a form with a dropdown combobox bound to the field that you want the user to select. Put a command button on the form to execute the query.

Basically, show the form before you want to run the query. The user selects the values to be searched for. Clicks on a command button. In your command button's click event you out the code:

sub cmdExecute_Click
docmd.openquery "qryName"
end sub

In your query definition you insert a parameter based upon the selected value of the dropdown combo box on your form. like frmSearch!cboEmail

Have a good one!
BK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top