Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Location
    NY
    Posts
    113

    Question Unanswered: Should this be 1 table or 2

    HI,
    What I am trying to do is I have a main form that has customer info. I have created a subform that will have 4 comboboxes. The first will be engine, tires, interior, and electronics. This will let us know who is working on what part of the car.

    For example, Mike and John they are designated for engine and only one works on the engine. So on the Engine combobox Mike or John will be the only choice(s) and they wil not work on other parts of the car.

    What I did was, I created a RepEmpId in the main table and joined it to a table called RepEmpTable. I have three columns ID(auto), Name, and Type.
    The name is the name of the repair guy and TYpe is the type of repair, Engine, tires, etc.

    This is where I am stuck. For each combobox, I have a query that has its own criteria. When I click on Tires only the, tire guys are showing, etc. Which what I want. However, When I select one name, all the other comboboxes are filled with the same name. Am I missing a code for Onclick event?

    I could do this all in seperate tables but, I think that is unneccessary. :

  2. #2
    Join Date
    Sep 2004
    Location
    Kuala Lumpur
    Posts
    60
    You need at least three tables:

    RepairType
    Employee
    Repair (Main)

    Relationships:
    RepairType(1):Employee(Many)
    Repair(1):RepairType(Many)

    The first relationship will sort out WHAT can be done by WHOM.
    The second relationship will give you the MANY repair type options for EACH job.

    w
    Last edited by wazz; 10-10-04 at 00:55.

  3. #3
    Join Date
    Aug 2004
    Location
    NY
    Posts
    113
    I am still getting the same problem. I followed what you said.

    Everytime I select an Employee who is working on the engine, it fills the other sections as well with the same employee. In the drop down menu, I do see what i am supposed to see but when I select the employee it fills the other comboboxes.

  4. #4
    Join Date
    Sep 2004
    Location
    Kuala Lumpur
    Posts
    60
    hi. i've attached a db that might help. i haven't made any forms but click through the tables (i've added some sample data) and let me know if this works for you.
    w
    Attached Files Attached Files

  5. #5
    Join Date
    Aug 2004
    Location
    NY
    Posts
    113

    Still stuck on this design

    Wazz, thans for your help but it still isn't what I am looking for. I am still getting all the names for the drop down menu when it is in a form. Maybe I setup the form incorrectly. Also When I select a repairman for engine, that one choice should be my only one. I also want to leave the design so further people can be added

    When I have it in a subfom it just keeps listing them. What i am looking for is:
    Customer: 1
    Combo1 (Engine): Vick
    (Urlacher) Engine
    (Pennington) Engine

    Combo2(Interior): Manning
    Bledwso(Interior)
    Sharpe(Interior)

    Combo3(tires): Shockey
    Attached Files Attached Files
    Last edited by Leventcos21; 10-11-04 at 11:42.

  6. #6
    Join Date
    Aug 2004
    Location
    NY
    Posts
    113

    Still getting dups in comboboxes

    I hae tried this with numerous designs but my combobox is still displaying duplicates. Is there a solution to correct this?

  7. #7
    Join Date
    Sep 2004
    Location
    Kuala Lumpur
    Posts
    60
    hi. i'm afraid i can't quite get it either, at least not without more work and some coding (which would take me too long). i think i know what you're trying to achieve though.

    i've added some forms that i think do the job you need, but alas, without the combo box idea just as you want.

    check this new version of the db.

    start with frmCustomer. the frmService will open automatically. in the subform you can see everyone who worked on the job and you can add new records if another job was added. as you move through frmCustomer, frmService will change to reflect the CustomerID (i have hidden two fields in the subform).

    Note: i added some unbound comboboxes on the right side of frmCustomer that don't have anything to do with the rest of the form as it stands now. i was thinking that as you update each combobox a new record could be added to the subform. (that's where the coding would come in).

    w
    Attached Files Attached Files

Posting Permissions

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