Drop down list to select desired codes of a category

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Islamzada
    New Member
    • Feb 2013
    • 1

    Drop down list to select desired codes of a category

    Dear Friends;
    I have a problem in drop down list, well I have two tables which i want to prepare a store database.

    I have two tables;

    in table code below are introduced:
    Consumption Group: Con-001
    Con-002
    Fixed groups : Fix-001
    Fix-002
    Raw materials : RAW-001
    : RAW-002

    in table M_Code below are introduced:
    Categories: "Consumptio n" or "Fixed" or "Raw Material"
    Code:Con-001 or fix-001
    Name: book, note book or whatever
    Description:

    Note, I have introduced many codes for fixed, consumption and raw materials nearly 1000 code for each group.

    Now what i want to do is, that in M_code table when I select any of three category the related codes which are belongs to that category appear.

    Please help me.
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    There are a few ways of doing this. Probably the easiest (and the most normalized) would be to have a third table that just has your different types of codes, Consumption, Fixed, and Raw. The table design would be something like
    Code:
    [U]Name: tblCodeType[/U]
    Fields:
    TypeID, Primary Key, AutoNumber
    Type, Text
    Your data would then be
    Code:
    1     Comsuption
    2     Fixed
    3     Raw Material
    You would then add a field to your table of codes so that each code could be categorized so that we could know which type of code it is. This will allow us to display only to codes which are of the type selected.

    Now, what do you mean by appear? Do you want them in a subform, a combo box, or do you want a new form to open? Exactly how do you want them to appear?

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      Your database sounds like you're well on your way; however, I get the feeling from your post that you're still either unsure of your design, or that this may be one of the first database projects you've undertaken by yourself.

      Therefore, before you get too much farther into the current development you really should take a look at the following: A Tutorial for Access as the these basics will be vital to saving you many tears and hours of "banging into the wall."

      Database Normalization and Table Structures. is one of the hardest concepts for people to grasp when it comes to database design. We're so used to spreadsheets with flat-data that this just doesn't seem to make sense. Until you need to manipulate the data.

      These links will help you ask much clearer questions and with your answers:

      Posting Guidelines

      How to ask good questions

      FAQ

      Before Posting (VBA or SQL) Code

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        You may find looking at Cascaded Form Filtering will arm you with the tools you require to understand how to go about such a task.

        Comment

        Working...