Link to home
Start Free TrialLog in
Avatar of J2015
J2015

asked on

Table/Query or Value List field lookup whose content depend on another field's content. How-to?

Hi,

I'm trying to design an Access table in which a field named "Choice" would present, in datasheet view, a dropdown list whose possible values would depend on another field named "Category".

For example, say a record would have " Category='Color' ", then field "Choice" might present a dropdown list with 3 possible choices : "Red", "Green", and "Yellow". However, if it would be " Category='Fruit' " the dropdown list would show 2 possible choices : "Apple" and "Orange".

In other words, the value of the "Category" field would determine the available options in the "Choice" dropdown.

How can I do that?

Thanks,

Jean
Avatar of bfuchs
bfuchs
Flag of United States of America image

create a table with two columns category and choice, there you enter all possible choices for each category, then in selection have two drop downs, one with all categories and the second should have all choices where category = formname. firstcombo.
in the after update event of first combo write combo2.requery.
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of J2015
J2015

ASKER

That's what I thought. I just wanted to be sure.

Thanks.

jean