Results 1 to 2 of 2
  1. #1
    desireemm1 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    50

    Unhappy Cascading Combo Boxes

    Hi all, I am trying to make the rowsource of the Services_Covered combo box
    dependent on the Catagory_for_hours combo box and I am wondering if I di this correctly. The bosses want the rowsource to be exact, hope I'm doing this right
    When I tested the code it told me that Access can not find Catagory_for_hours. Which I dont understand because thats what the combo box is called its not mispelled. can anyone help pls I need for the Results of the Services_Covered to be based off whats chosen in the Catagory_for_hours. for example if the user picks ITP From Catagory_for_hours then the only thing that should show in Services_Covered is

    Academic Assessment;MER Completion - TANF;Career Training Plan;Counseling;Phone Call"
    Can anyone help pls


    Private Sub Catagory_for_hours_AfterUpdate()


    Select Case Me!Catagory_for_hours
    Case "ITP"
    Me!Services_Covered.RowSource = "Academic Assessment;MER Completion - TANF;Career Training Plan;Counseling;Phone Call"
    Case "Parenting"
    Me!Services_Covered.RowSource = "EHS Training/Home Visit;Training/Office Visit;Independent Study"
    Case "Job Skills Training"
    Me!Services_Covered.RowSource = "Independent Job Skills Training;Career Training Workshop;Resume Writing"
    Case "Culture"
    Me!Services_Covered.RowSource = "SCAIR Soaring Eagles;Regalia;Pow Wow Participation"
    Case "Education"
    Me!Services_Covered.RowSource = "GED/High School Diploma Preparation;Adult Basic Education;Independent Study"
    Case "Life Skills"


    Me!Services_Covered.RowSource = "Drivers Education"
    Case "Travel"


    End Select

    End Sub

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    What you need is to create two new tables

    Table 1 has level one info

    ID - Primary Key
    Desc - description

    Table 2

    ID - Primary Key
    Grp - ID of Table 1 (Foreign Key)
    Desc: Description of level 2 item

    Eg:
    Table 1
    1 DescA
    2 DescB
    3 DescC

    Tabe 2
    1 1 Level A
    2 1 Level B
    3 1 Level C
    4 2 Level D
    5 2 Level E

    The rowsource of the first combo would be

    Select Id, Desc From Table 1
    Bound Column 1
    Col Widths 0,3


    After the user has selected an item from the first combo the after update event would be

    Me.ComboBox2.Rowsource = "Select ID, Grp, Desc From Table2 Where Grp = " & Me.ComboBox1

    Bound column 1
    Col Widths 0,0,3


    David

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

Similar Threads

  1. Replies: 3
    Last Post: 01-30-2012, 09:43 AM
  2. Cascading Combo Boxes
    By gjw1012 in forum Access
    Replies: 1
    Last Post: 07-25-2009, 04:59 PM
  3. Problem with Cascading Combo Boxes
    By CushingMT in forum Forms
    Replies: 0
    Last Post: 11-13-2008, 09:44 AM
  4. cascading combo form
    By tonysomerset in forum Forms
    Replies: 0
    Last Post: 08-27-2008, 02:10 AM
  5. Cascading Combo Box
    By nywi6100 in forum Forms
    Replies: 0
    Last Post: 10-23-2006, 01:45 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