How do I get a combo box in a dialog box of a parameter query?

G

Guest

I have set up a parameter query and would like the dialog box to be in the
style of a combo box. To enable the user to select from a drop down list when
the dialog box pops up as the query is run. Does anyone know if this is
possible. The field is already set as a combo box in the table.
 
D

Douglas J. Steele

It's not possible.

What you can do is develop your own form with the appropriate combo box on
it, and base the query on that control. Your query will only work when the
form's open though: trying to run the query when the form isn't open will
not open the form for you.
 
B

Brendan Reynolds

Not using the built-in parameter dialog, no. You can do it using a custom
form. Your query needs to look something like this ...

SELECT * FROM YourTable WHERE YourField = Forms!YourCustomForm!YourComboBox

And the form must be open when the query is executed.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

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

Top