Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2010
    Posts
    9

    3RD Tier Combo Box

    Heya guys,



    I was wandering if anyone could help me, im tearing my hear out at a problem with combox boxes based on selections of another combo box.

    I can get the 2nd Combo box to display corectly based on the selection of the first. But getting the 3rd to display corectly based on the second is driving me insaine lol


    What i have is a database that has a some tables (Suppliers, Materials, Contracts)

    What i am trying to do is to add a subform in contracts to keep a record of what materials have been used with what contracts. Im not really having an issue with this, however entering the material data in the subform on the contracts form is whats causing the problems.

    The user has a set of options to add a new material to a contract, The supplier, the material itself and the unit price. I can get it to display the Suppliers, and what materials they supply based on relating combo boxes, hower when i try to get it to display the unit price based on the material selection it simply doesnt wanna know.

    Iv gone through the SQL code over and over again and i really cant see a reason for it, any help would be appreciated

    Iv uploaded a sample of what im trying to accomplish below, just open the contracts form to see the problem

    Linky -
    http://www.quickfiles.net/535395 (Download Link)

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Let me start you off here: http://www.mvps.org/access/lookupfields.htm

  3. #3
    Join Date
    Nov 2010
    Posts
    9
    Thanks for the link man, had a lookie thorugh it but i dont think it relates to the problem im having. When opening the contracts form its not throwing an error at me. Its getting the information i require for the 1st and 2nd combo box with no problem. The issue is that its simply not getting the data for the 3rd box based on the selection of the 2nd box.

    Im using the same SQL methord to get the data for the 3rd box, it worked on the second but not the 3rd. I must be blind cause i cant see any reason for it lol

  4. #4
    Join Date
    Nov 2010
    Posts
    9
    My appologies RualGuy, i re-read the link you posted and indeed it resolved the issue. When i made the selection from the first combo box, it actuly returns the ID of material in question for the 2nd combo box and not the name. While the name is displayed in the combo box its actuly the ID its referncing.

    On the 3rd combo box, all i had to do was make the SQL statement refer to the MaterialID in the Materials table from the MaterialName in the subform [Material Name in subform is actuly masked at the MaterialID].

    Cant belive i didnt see that before, but thank you for the help, hope this post helps anyone else with the same issue

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    All LookUp Fields do is help confuse the programmer. Everything they do can be done with a ComboBox on a form. Glad to hear it pointed you in the right direction. Are you ready to follow the link in my sig in post #2 and mark this thread as Solved?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 10-18-2010, 09:44 PM
  2. Combo box dependant on another combo box
    By nianko in forum Forms
    Replies: 15
    Last Post: 08-20-2010, 07:06 AM
  3. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  4. Replies: 3
    Last Post: 02-26-2009, 10:17 AM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums