Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

How to populate lookup list.

Discussion in 'Information Technology' started by rg, Jul 28, 2006.

  1. rg

    rg
    Expand Collapse
    Guest

    I have a table with two separate fields that I use lookup for. After the
    user has enetered the first field, I want to limit the choices for the second
    field to only those that correspond to the choice made in the first. For
    example, the Strand "A" can only have Standards 4, 5, 6 or 7. This
    information is from the Standards table. If I make the Strand field the
    source for the lookup up, the user can pick "A". Once they've picked "A", I
    want to place only those Standards that are associated with "A" in the lookup
    for the Standard field. How can I put this criteria on the lookup?
    -rg
     
  2. You can try basing the query of the second list on the first list i.e. the
    query that populates the first list in the criteria you just point back to
    the first list

    If i had a list of items that were dependend on categoryid i would just make
    the item list query's CategoryID=Category List
    you may have to requery the second list after your user selects the first
    list item

    "rg" <rg@discussions.microsoft.com> wrote in message
    news:9EB9C701-F536-463B-99DD-492F071EB25C@microsoft.com...
    > I have a table with two separate fields that I use lookup for. After the
    > user has enetered the first field, I want to limit the choices for the

    second
    > field to only those that correspond to the choice made in the first. For
    > example, the Strand "A" can only have Standards 4, 5, 6 or 7. This
    > information is from the Standards table. If I make the Strand field the
    > source for the lookup up, the user can pick "A". Once they've picked "A",

    I
    > want to place only those Standards that are associated with "A" in the

    lookup
    > for the Standard field. How can I put this criteria on the lookup?
    > -rg
     
  3. Jeff Boyce

    Jeff Boyce
    Expand Collapse
    Guest

    You mention your "table" and doing "lookup".

    If you are talking about setting up fields in tables as "lookup" data types,
    please reconsider. Take a look through the tablesdbdesign newsgroup for a
    host of reasons why using lookup data fields causes problems.

    In your situation, Access does not have triggers on its tables, so there is
    not a way to do this solely within the table.

    On the other hand, using "cascading combo boxes" is quite common in Access
    forms. Take a look in Access HELP on this topic, or visit mvps.org/access,
    or google on the term.

    Regards

    Jeff Boyce
    Microsoft Office/Access MVP

    "rg" <rg@discussions.microsoft.com> wrote in message
    news:9EB9C701-F536-463B-99DD-492F071EB25C@microsoft.com...
    >I have a table with two separate fields that I use lookup for. After the
    > user has enetered the first field, I want to limit the choices for the
    > second
    > field to only those that correspond to the choice made in the first. For
    > example, the Strand "A" can only have Standards 4, 5, 6 or 7. This
    > information is from the Standards table. If I make the Strand field the
    > source for the lookup up, the user can pick "A". Once they've picked "A",
    > I
    > want to place only those Standards that are associated with "A" in the
    > lookup
    > for the Standard field. How can I put this criteria on the lookup?
    > -rg
     

Share This Page