Can a combo box be used in a parameter query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to build a parameter query that prompts for criteria each time it
is run. I have been able to do that. What I would like to do, but have not
been able to, is have one of the criteria dialog boxes have a combo box/drop
down select list. Is this possible to do in a query? Or am I dreaming?
Thanks
 
I am trying to build a parameter query that prompts for criteria each time it
is run. I have been able to do that. What I would like to do, but have not
been able to, is have one of the criteria dialog boxes have a combo box/drop
down select list. Is this possible to do in a query? Or am I dreaming?
Thanks

You'll need to create a form with the combo box on it (or add the
combo to an existing form).

Then change the query parameter to:

Forms!FormName!ComboName

The form must be open when the query is run.
Select the value in the combo box, then run the query.
If this is a stand alone query, add a command button to the form.
Code it's click event:
DoCmd.OpenQuery "QueryName"
Me.Visible = False

Remember to close the form after the query is closed.
This can be all done using code, but you haven't indicated what else
you are doing, so this is as far as I can go now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top