Results 1 to 5 of 5
  1. #1
    BobTheNoob is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    1

    Filtering Fields Based on Prior Field Selections

    Hello, I'd like some help with a portion of a project that I am struggling with. Let's say I had two fields in a table that need to be populated by the user. The first field presents a dropdown list of general colors (Blue, Red, Green, Yellow, etc...) and the user can select as many of the colors as necessary. The lookup field gets these values from a table that presents a defined list of colors and multiple values are allowed. I also have a table containing the general colors as a field and for each general color there is a list of different shades (Navy Blue, Baby Blue, Blue Gray, etc...). I am struggling with filtering the shades in the user table, so that if the user chooses "Blue" as the color, the only options presented in the shades field are related specifically to the choice of the color blue. Thank you for any help provided.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    In Access the subject you are discussing is Cascading comboboxes. This is a link to an example. It is a common topic on this and other forums.

  3. #3
    usfarang is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2021
    Posts
    42
    Normally I would use a helper table for that. Do you have a details table of sorts for different shades?

  4. #4
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @BobTheNoob,
    Since you are using Look up FIELDS (in tables), you should read the following links:

    Did I Mention I Have a Thing Against Lookup Fields in Tables?

    The Ten Commandments of Access

    The Evils of Lookup Fields in Tables



    Note: Most developers consider Look-up FIELDS (in tables) a No-No.

  5. #5
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    Use an After Update Event. When you update the first combo box, set the row source for the other one based on what you selected.

    And like others said, do NOT use look up fields. Rather store colors in a table and link to them using a foreign key.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Limiting lists based on prior field selection
    By DAWNY2007 in forum Forms
    Replies: 17
    Last Post: 11-17-2021, 07:49 AM
  2. Replies: 5
    Last Post: 11-03-2017, 06:48 PM
  3. Replies: 4
    Last Post: 08-25-2013, 07:43 AM
  4. Replies: 2
    Last Post: 06-19-2012, 08:30 AM
  5. Replies: 13
    Last Post: 09-27-2010, 03:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums