-1

I have 4 tables in a MS Access database, namely

  • Table1 (values - A, B, C, D)
  • Table2 (values - P, Q, R, S)
  • Flags (values - Y, N)
  • Table3 has two columns, TYPE and DESCRIPTION

The TYPE column is a lookup from the FLAGS table (ie Y or N).

The DESCRIPTION column is also a lookup column, using Y or N values from the TYPE column.

  • If Y, then lookup all values from Table1 (ie A, B, C, D)
  • If N, then lookup all values from Table2 (ie P, Q, R, S)

How to achieve this?

New contributor
Vijayarajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
7
  • 2
    New users are recommended to take the tour and visit the help center and to read How to Ask before posting their first question. Usually for questions asking for help with SQL queries, the question should contain the structure of the tables involved, i.e. column names and their data types, sample data (which it appears you have supplied) and desired query result based on the supplied sample data. You need to edit your question and provide those details, otherwise I believe your question will be closed. Commented 2 days ago
  • Please provide a minimal reproducible example Commented 2 days ago
  • 1
    Please ensure your minimal reproducible example includes example data and desired results for that example. Commented yesterday
  • 2
    Are these real table names (Table1, Table2, Table3)? What data is in these tables? How are they related? Can't use a lookup field in table to dynamically pull from different tables. Actually, advise against using lookup fields in tables at all. Use comboboxes on form and code to change RowSource. Commented yesterday
  • 1
    If I understand correctly, you want DESCRIPTION lookup to be dynamic (pulling from either Table1 or Table2) based on value of TYPE field? Why do you even have 2 tables instead of 1? Y and N are odd values for a "TYPE" entity. Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.