Welcome to SPN

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

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution   

Selecting from list based on previous entry

Discussion in 'Information Technology' started by LDCorey, Nov 2, 2005.

  1. LDCorey

    LDCorey
    Expand Collapse
    Guest

    Hi,
    I am creating a table in MS Access where I would like to use a List Box to
    select a value from a list. Unfortunately, I need to change the values in the
    List Box based on a previous column in the table. The second column is "Major
    Category" and the third column is "Minor Category". I have a list of items
    for "Major Category" in another table and a list of items for "Minor
    Category" in another table associated with the Major Category.
    When I use this statement:
    SELECT [Minor Categories].[Minor Category] FROM [Minor Categories] WHERE
    (((Questions.[Major Subject])=[Minor Categories].[Major Category]));
    I can select the Questions.[Major Subject] from the List Box, but when I go
    to open the List Box for Questions.[Minor Subject], Access pops up a Dialog
    Box asking for the "Major Subject". It will then generate the correct List
    Box for the "Major Category" I type in. Since I will have a large number of
    rows to add to the table, I rather not do any extra typing.
    Does anyone have an idea why it doesn't work as expected?
    Lance
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News How The Left & Indian Nationalists Distorted The History Of Sikh Gadhar Movement - Breaking News Sep 21, 2016
    Interfaith Materialists And Its Discontents Interfaith Dialogues Jun 10, 2016
    Sikhi Quasi-Pragmatists And Quasi-Spiritualists, Care To Explain? Sikh Sikhi Sikhism Jun 6, 2016
    Cholesterol Is Finally Officially Removed From "naughty List" Health & Nutrition Feb 11, 2016
    Listening to Gurbani while driving?? Sikh Rehat Maryada Jan 13, 2016

  3. Jeff Boyce

    Jeff Boyce
    Expand Collapse
    Guest

    It sounds as though you are trying to do this in the table. If so, DON'T!

    Access tables store data, Access forms (and reports) display data (and help
    you look it up).

    Is there a chance you are trying to use the "Lookup" data type within the
    table? You and Access will both get headaches if you are.

    Check the tablesdbdesign newsgroup on the topic of Lookup data types if any
    of this fits your situation.

    Regards

    Jeff Boyce
    <Office/Access MVP>

    "LDCorey" <LDCorey@discussions.microsoft.com> wrote in message
    news:9342C28A-E320-4A1F-A9BF-ED70858AC055@microsoft.com...
    > Hi,
    > I am creating a table in MS Access where I would like to use a List Box
    > to
    > select a value from a list. Unfortunately, I need to change the values in
    > the
    > List Box based on a previous column in the table. The second column is
    > "Major
    > Category" and the third column is "Minor Category". I have a list of items
    > for "Major Category" in another table and a list of items for "Minor
    > Category" in another table associated with the Major Category.
    > When I use this statement:
    > SELECT [Minor Categories].[Minor Category] FROM [Minor Categories] WHERE
    > (((Questions.[Major Subject])=[Minor Categories].[Major Category]));
    > I can select the Questions.[Major Subject] from the List Box, but when I
    > go
    > to open the List Box for Questions.[Minor Subject], Access pops up a
    > Dialog
    > Box asking for the "Major Subject". It will then generate the correct List
    > Box for the "Major Category" I type in. Since I will have a large number
    > of
    > rows to add to the table, I rather not do any extra typing.
    > Does anyone have an idea why it doesn't work as expected?
    > Lance
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page