Results 1 to 2 of 2

Thread: Cascading Issue

  1. #1
    Join Date
    Mar 2003
    Posts
    225

    Unanswered: Cascading Issue

    i have a subform called Tbl_Trainingsubform

    on here i have two combo boxes which i am trying to setup as casacading...i believe this is how they are referred to anyway.

    combo box 1 is called cbosection the other is called cboactivity

    i have a table called tbl_training which has the following

    trainingID
    Activity
    Section

    and here is my sql that i have put on the afterupdate of Section...

    Private Sub cbosection_AfterUpdate()
    On Error Resume Next
    cboActivity.RowSource = "Select Tbl_Training.activity " & _
    "FROM Tbl_Training " & _
    "WHERE tbl_Training.section = '" & cboSection.Value & "' " & _
    "ORDER BY Tbl_Training.activity;"
    End Sub


    what i am trying to achieve is that when the user selects from the section box, the combo box activity will then be limited to the relevant list

    someone suggested trying the following:


    Private Sub cbosection_AfterUpdate()
    On Error Resume Next
    cboActivity.RowSource = "Select Tbl_Training.activity " & _
    "FROM Tbl_Training " & _
    "WHERE tbl_Training.section = '" & me.cboSection & "' " & _
    "ORDER BY Tbl_Training.activity;"
    End Sub


    but that didnt work either


    what am i doing wrong


    Andy
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    what do you have for cbosection as:
    .rowsource
    .columncount
    .boundcolumn

    (i don't download mdb, sorry)


    consider getting rid of the
    on error resume next
    ...maybe you get a helpful error message.

    izy
    currently using SS 2008R2

Posting Permissions

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