Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2004
    Posts
    3

    Unhappy Unanswered: Combobox fills combobox

    I have 1 combobox called catagory after selecting the Cat I want it to fill the next combo box with information from the sub catagory.
    tables I am runnig are 1 for catagory then 8 tables for each catagories sub-catagory. how do I get the 2nd box to refer to the right table after selecting the main catagory.
    Please help.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    That sounds like bad database design.

    Could you go into more detail about your overall table structure?

    I'm willing to bet you could get by having ONE table for sub categories. However, that really depends on the specifics.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231
    in your afterupdate event of the category combobox, put something along the lines of:
    Code:
    cboSubCategory.Value = Null
    cboSubCategory.RowSource = "SELECT fldWhatever FROM tbl" & cboCategory & ""
    The above is dependent on what you have named your tables and how you've set thing up, but that's the general idea. it's assuming you have the table named tbl+whatever is the selected text in the first combobox. modify it as you need to and it should work. if you can't get it to work, post some more details. good luck

  4. #4
    Join Date
    Dec 2004
    Posts
    3
    catagory contains different sub-catagories the whole database is based on tracking repairs to items there is model/serial #, catagory, sub-catagory, then the form is to fill in information concerning repairs to the Cat/Sub-cat
    If there is a better way to design I am all ears. Database is just being built.
    the reports I will need to run will be based on Model repairs, cat repairs, and sub-cat repairs. the rest of the info is just tracking.

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    That's not quite enough info. Please explain it like we know NOTHING about your project because, well, we don't.

    In general, you seem to missing the whole "relational database" concept.

    You can have ONE table for categories and ONE table for sub-categories linked by keys.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Dec 2004
    Posts
    3
    db objective - track equipment under warranty (simple input machines and warranty dates)

    2nd objective - track warranty repairs and other repairs that may be manufacture defect based on model(20 different models) major catagories (i.e. engine, body or wheels) and sub-catagory (i.e. cat engine has sub-cat fuel, air, head. Cat body has sub-cat frame, railing, operator station).

    the end users of db are very computer illiterate db must be simple to use.

    current tables - Model, Catagory, (these next 7 are the entries in the catagory table)Engine, Hydraulics, Drive Train, Electrical, Body, Modification, Misc; each sub-cat has different entries then the others.

    form for entry - combo box for model work good, combo box for serial # works good, combo box for Catagory works but need that selection to make the next combo box i.e. sub-catagory be selection from the appropriate sub-cat table if possible; if not possible will need to redesign db to allow as much narrowing down for report purposes as possible.

    desired end result - be able to run reports showing a trend in component failures. only thing R&D understands is a strong paper trail.

    Thanks for all help.

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    k, as suspected you can do this with two tables.

    tblCategory
    ---------
    category_id
    description

    tblCategoryDtl
    ---------
    category_dtl_id
    catgory_id
    description

    To track repairs:

    tblRepairs
    ----------
    repair_id
    category_dtl_id
    due_date?
    misc_comment



    The basic idea is you can figure out the category through the category id in the categorydtl table.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Hi Preacher1972,
    See if the sample database posted here is what you are wanting to do:

    have a nice one
    BUD
    Attached Files Attached Files

  9. #9
    Join Date
    Nov 2004
    Posts
    64
    Thanks Bud just what I needed

    Peter.t

  10. #10
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by Peter.t
    Thanks Bud just what I needed

    Peter.t
    Welcome Peter.t anytime and glad it was something you could use
    .....have a nice day
    BUD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •