Access 2007 - "if-then" rules for selecting lists in a form?

  • Thread starter Director of Exhibits
  • Start date
D

Director of Exhibits

In my museum operations database, I have 190 exhibits, in 27 galleries, at 2
locations. I would like help in setting up a form so that I can select an
exhibit by starting at lthe ocation, then going to galleries, then exhibits.
For example instead of scrollling through a list of 190 possible exhibits, I
would like to select location A, then when I tab over to galleries, only
galleries in location A are possible in a pull down list, then if I select
gallery 5, then only the 12 exhibits in gallery 5 are possible in a pull down
list.
IS this possilbe in Access? How is this hierachy done?

Thank you.
 
D

Dirk Goldgar

Director of Exhibits said:
In my museum operations database, I have 190 exhibits, in 27 galleries, at
2
locations. I would like help in setting up a form so that I can select an
exhibit by starting at lthe ocation, then going to galleries, then
exhibits.
For example instead of scrollling through a list of 190 possible exhibits,
I
would like to select location A, then when I tab over to galleries, only
galleries in location A are possible in a pull down list, then if I select
gallery 5, then only the 12 exhibits in gallery 5 are possible in a pull
down
list.
IS this possilbe in Access? How is this hierachy done?


Of course it's possible. It's usually called "cascading combo boxes" (or
list boxes). The page below shows two different ways to achieve it:

http://www.mvps.org/access/forms/frm0028.htm
Forms: Limit content of combo/list boxes
 
M

magick

yes - this probably is not the only way, and not sure how you have your
form(s) set up, but i have set up a series of combo boxes. after you select
the first level (i.e. location), the next level (i.e. galleries) is based on
a query that is filtered by the object that the user has selected in the
first combo box. The exhibits combo box query would be filtered on what the
user selects from the galleries combo box. the syntax in your query's filter
to refer to the previous combo box is as follows:

[forms]![NameofForm]![NameofPreviousComboBox]

you should also set each combo box to "requery" in the On Got Focus property
so that it will rerun and pick up the most recently selected choice each time.
 

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