? value input of one variable change options on second variable?

G

Guest

In our database, we wish to have the following:
item #1 is either yes/no. Item #2 has 5 possible values, say, A,B,C,D, and E.

We want it to behave as follows:
if the user inputs item #1 as yes, then Item #2 will only allow C,D, or E as
possible values (ideally, in adjacent drop down list)
if the user inputs item #1 as no, the Item #2 will allow only A,B,or C as
possible values.

I would appreciate help, even if it's to a reference to the type of control
I need to look up for this situation.
 
M

Marshall Barton

TedDushane said:
In our database, we wish to have the following:
item #1 is either yes/no. Item #2 has 5 possible values, say, A,B,C,D, and E.

We want it to behave as follows:
if the user inputs item #1 as yes, then Item #2 will only allow C,D, or E as
possible values (ideally, in adjacent drop down list)
if the user inputs item #1 as no, the Item #2 will allow only A,B,or C as
possible values.

I would appreciate help, even if it's to a reference to the type of control
I need to look up for this situation.


Many choices of which controls you can use for users to
select their choices. Typically, item 1 would be a check
box or a combo box and item 2 would be a combo or list box,
but there are others that can be used for this kind of
thing.

How you make one control's possible value dependent on the
value in another control is determined by the source of the
possible values in item 2. Usually the values of a combo
box are stored in a table with a field for the value and a
filed for its category. E.g. here's one possible table
that could be used as the RowSource of the item 2 combo box:

table ItemTwos
Text Boolean
I2 I1
A False
B False
C False
C True
D True
E True

Then the combo box's RowSource query would be:

SELECT I2
FROM ItemTwos
WHERE I1 = Forms!yourform.chkI1
 

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