Welcome to SPN

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

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

Filtering Data

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

Tags:
  1. JoeW

    JoeW
    Expand Collapse
    Guest

    Hey,
    I'm trying to create a type of filter to use in a database i'm
    currently creating. Basically, there are two categories, Products, and
    Sub Products. I believe I'm close, as I can get it to work somewhat,
    but it's not doing quite what I need it to. I have a front end form,
    on which I have several fields presented for viewing. When editing
    data, I have a predetermined set of Products that a user could select
    from, for example, Services, Medical Services etc. What I want is,
    when a user selects a more broad group such as Medical Services, a
    different combo box would then be populated with a selection of Medical
    Services SubGroup. I want to use predetermined lists like this to keep
    conformity within the data.

    The way I'm currently attempting to achieve this is I have two
    different tables, my main one with customer information, and then a
    second, Products table which has two columns, Products and SubProducts.
    I then went through and specified Products column Medical Services,
    SubProducts Dentist, so Dentist would be a subproduct of Medical
    Services etc. I then have a sql query like this:
    SELECT SubProduct
    FROM tblProduct
    WHERE Product=(text box on the form)

    Is this a viable solution to my problem? Or is there something I'm not
    seeing, or don't know.

    Thanks for any help anyone can offer!
     
  2. Loading...


  3. Joan Wild

    Joan Wild
    Expand Collapse
    Guest

    See
    http://www.mvps.org/access/forms/frm0028.htm

    --
    Joan Wild
    Microsoft Access MVP

    JoeW wrote:
    > Hey,
    > I'm trying to create a type of filter to use in a database i'm
    > currently creating. Basically, there are two categories, Products,
    > and Sub Products. I believe I'm close, as I can get it to work
    > somewhat, but it's not doing quite what I need it to. I have a front
    > end form, on which I have several fields presented for viewing. When
    > editing data, I have a predetermined set of Products that a user
    > could select from, for example, Services, Medical Services etc. What
    > I want is, when a user selects a more broad group such as Medical
    > Services, a different combo box would then be populated with a
    > selection of Medical Services SubGroup. I want to use predetermined
    > lists like this to keep conformity within the data.
    >
    > The way I'm currently attempting to achieve this is I have two
    > different tables, my main one with customer information, and then a
    > second, Products table which has two columns, Products and
    > SubProducts. I then went through and specified Products column
    > Medical Services, SubProducts Dentist, so Dentist would be a
    > subproduct of Medical Services etc. I then have a sql query like
    > this:
    > SELECT SubProduct
    > FROM tblProduct
    > WHERE Product=(text box on the form)
    >
    > Is this a viable solution to my problem? Or is there something I'm not
    > seeing, or don't know.
    >
    > Thanks for any help anyone can offer!
     
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