Chimp8471
Registered User.
- Local time
- Today, 22:50
- Joined
- Mar 18, 2003
- Messages
- 353
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
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