Results 1 to 9 of 9
  1. #1
    sullyman is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    7

    Dropdown - need help please

    Hi Folks,



    Have managed to get two cascading dropdowns working but need three and can't get the third working. (see included file)

    The CHistory form will only used to view courses completed by employees. I hope to include a Subform on the CHistory form to show the employees when the third dropdown is chosen.

    Please help as this is driving me nuts. Have been all over the web but there does not seem to be any tutorials or sites explaining anything more than 2 cascading dropdowns.

    Thanks

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The method to get the 3rd cbo to work is just like what it took to get the 2nd one to work.

  3. #3
    sullyman is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    7
    Thanks for reply but i am having difficulty adding the first two combos to make the third combo. I tried the below but had no luck. Any help is greatly appreciated.


    Me.CboCourse.RowSource = "SELECT Distinct Courses.Course FROM" & _
    " Years INNER JOIN Courses INNER JOIN Locations INNER JOIN CHistory ON Locations.LocationID = CHistory.LocationID ON Courses.CourseID = CHistory.CourseID ON Years.YearID = CHistory.YearID WHERE [CHistory].[YearID] = " & _
    Me.CboYear & _
    " AND [CHistory].[LocationID] = " & _
    Me.CboLocations & _
    " ORDER BY Courses.Course"
    Me.CboCourse = Me.CboCourse.ItemData(0)

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would think the 3rd cbo would only need to reference the 2nd cbo, not both the 1st and 2nd; otherwise what is the reason for setting up the 2nd cbo with the 1st?

  5. #5
    sullyman is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    7
    Thanks - i have tried the following but had no luck

    Me.CboCourse.RowSource = "SELECT Distinct Courses.Course FROM" & _
    " Courses INNER JOIN [CHistory] ON Courses.Courseid = [CHistory].Courseid WHERE [CHistory].[LocationID] = " & _
    Me.CboLocations & _
    " ORDER BY Courses.Course"
    Me.CboCourse = Me.CboCourse.ItemData(0)

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    WHERE [CHistory].[LocationID] = " & Me.CboLocations
    Are these two fields the same data type and is that numeric?

  7. #7
    sullyman is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    7
    I think you have found the problem. They are not the same.

    I constructed the first combo using the wizard so the key is saved by access to be remembered for later etc.

    The second combo i did not use the wizard. Is there an option/switch i can turn on for the second combo to remember the key for this field also?

  8. #8
    sullyman is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    7
    Would it be too much to ask for a working demo please. I am a novice and i can't get the primary key to pass correctly on the second combo. I don't know if my tables are even right and might have just fluked the first combo

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What field in the 3rd RowSource will match up with the 2nd ComboBox?

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

Similar Threads

  1. How to make a Column in Access a DropDown
    By JohnGrove in forum Access
    Replies: 4
    Last Post: 03-10-2009, 07:56 AM
  2. Drop Down, link to another dropdown
    By davelliott in forum Forms
    Replies: 3
    Last Post: 05-23-2006, 08:05 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