T
Tina Marie
Hello ... trying to use a combo box on a form so that when you chose from the
first combo box (themes), it filters the next combo box for only that one
theme and displays its specific subthemes ... then repeat for subsubthemes ...
Here are the 3 tables that 'house' the data, the 3 tables the have the drop
down info and the code I put into the 'after update' event on the theme combo
box:
Can anyone see what is wrong ... currently, I click the first drop down
(theme) and I choose one but then the next drop down lists nothing!! Help!!
See below
Tables that will ‘house the data’:
Table 1 Table 2 Table 3
tblThemes: tblSubThemes tblSubSubThemes
strThemeID strSubThemeID strSubSubThemeID
strTheme strSubTheme strSubSubTheme
strAgencyID strThemeID strSubThemeID
strLogID
Tables that hold the drop down info:
tblListofThemes tblListofSubThemes tblList ofSubSubThemes
strTheme strTheme strTheme
strSubTheme strSubTheme strSubSubTheme
On the form, the combo box ‘after update’ event is:
Private Sub cboThemes_AfterUpdate()
Me.cboSubThemes.RowSource = "select strsubtheme from" & _
"tbllistofsubthemes where strtheme=" & _
Me.cboThemes & _
"order by strtheme"
Me.cboSubThemes = Me.cboSubThemes.ItemData(0)
End Sub
first combo box (themes), it filters the next combo box for only that one
theme and displays its specific subthemes ... then repeat for subsubthemes ...
Here are the 3 tables that 'house' the data, the 3 tables the have the drop
down info and the code I put into the 'after update' event on the theme combo
box:
Can anyone see what is wrong ... currently, I click the first drop down
(theme) and I choose one but then the next drop down lists nothing!! Help!!
See below
Tables that will ‘house the data’:
Table 1 Table 2 Table 3
tblThemes: tblSubThemes tblSubSubThemes
strThemeID strSubThemeID strSubSubThemeID
strTheme strSubTheme strSubSubTheme
strAgencyID strThemeID strSubThemeID
strLogID
Tables that hold the drop down info:
tblListofThemes tblListofSubThemes tblList ofSubSubThemes
strTheme strTheme strTheme
strSubTheme strSubTheme strSubSubTheme
On the form, the combo box ‘after update’ event is:
Private Sub cboThemes_AfterUpdate()
Me.cboSubThemes.RowSource = "select strsubtheme from" & _
"tbllistofsubthemes where strtheme=" & _
Me.cboThemes & _
"order by strtheme"
Me.cboSubThemes = Me.cboSubThemes.ItemData(0)
End Sub