combo box dependent on other entries

G

Guest

How can I have a combo box list values based on the value selected in a
previous form field? For example, I have a list of activities which could
grow to a large number, say 200. I don't want the user to have to scroll
through all of them each time, so when they select the area they are working
in on the form, I would like for the activity box list in the next form field
to be limited to those activities in that area. Thanks.
 
J

Jeff Boyce

For an idea how to do this with combo boxes, check mvps.org/access or
Google.com for "cascading combo boxes"

Good luck

Jeff Boyce
<Access MVP>
 
G

Guest

Hey Jeff,
thanks for the direction. I found something there that helps me out, but I
had a problem getting part of it to work so I have another question. Here is
what I have. combo1 contains is a drop down list from which the user must
choose a category. The next box, combo2 will display a list of all available
activities in the category chosen in combo1. I am new to creating queries,
so I created a simple parameter query and then changed it as follows: I
created a parameter query that returns all activities for a specific category
byt prompting the user which category he wants to view and set this query to
the on focus event of combo2. Next, I changed the parameter of this query so
that it was the value selected in combo1...this is where the problem came in.
I can't seem to get the parameter query to use the other fields values as
its parameter. Any ideas on where I went wrong?
 
J

Jeff Boyce

The criterion/parameter needs to look something like (your syntax may vary):

Forms![YourFormName]![YourFirstComboBox]

NOTE! If your underlying data tables use "lookup" datatypes, all bets are
off. Lookup fields store one value and display something else.

Good luck

Jeff Boyce
<Access MVP>
 

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