Drop down lists

E

Emily Bright

How can I make a query so that the criteria for the parameters are a drop
down list of the values in that field? For example, if the field is "Country
of Project", the user can choose from the available countries via a drop down
list rather than enter in "Kenya" in the criteria box. Also, is it possible
to let the user select more than one country (via using the Control botton
while selecting?) from this drop down list? I've been trying to figure this
out for days. ANY HELP would be greatly appreciated!! Thanks.
 
R

Roger Carlson

You cannot have a dropdown box in a parameter query. The usual solution is
to create a form on which you create a combo box and then reference the
combo box in the query. On my website (www.rogersaccesslibrary.com) is a
small sample database called "ParaQuerySelect.mdb" which illustrates how to
do this.

Creating a multi-selection query is a little more difficult. You can't use
a combo box, but you CAN use a multi-select listbox. However, you can't
reference these values as you can with the combo box as above. You actually
have to create and save the query in code. Also on my website is a small
sample database called "CreateQueries2.mdb" which shows you how to do that.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
K

Kirk Leader

Very Helpful! Thank you. This will save me a great deal of time and
frustration!
 

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