Share via

Conditional Relationship/Lookups

Anonymous
2016-04-04T23:53:47+00:00

Hi all,

I'm just starting to use Access (i.e. no SQL experience), and was wondering if it was possible to do a conditional lookup.

For example, in one column I have:

'Company'. In the next column, I want to have it set up so that if the cell for 'Company' = A, then there is a drop down from Column 'Locations' in Table A.

B, for B, etc.

Little help?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2016-04-05T03:25:05+00:00

    First, It is not recommended that you do lookups on the table level. This can cause more problems then its worth.  All lookups should be done using list controls on a form.

    Second, what you are referring to can only be done on a form. You would set the RowSource of your combo to look like:

    SELECT CompanyID, CompanyName

    FROM tblCompany

    WHERE CompanyName LIKE Forms!formname!textboxname & "*;"

    So whatever letter you type in the textbox, will filter the list of companys.

    Was this answer helpful?

    0 comments No comments