Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-11-23
3
Medium Priority
?
98 Views
Last Modified: 2016-11-25
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
0
Comment
Question by:J2015
3 Comments
 
LVL 4

Expert Comment

by:bfuchs
ID: 41899909
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.
0
 
LVL 40

Accepted Solution

by:
PatHartman earned 2000 total points
ID: 41901179
This is not possible in a table or query.  Cascading combos depends on event processing so you can only do this in a report or form.
0
 

Author Closing Comment

by:J2015
ID: 41901780
That's what I thought. I just wanted to be sure.

Thanks.

jean
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question