S
stfcTerryA
cboProject
cboProjectModel
cboProjectCard
cboProject - looks up projects in a table (tblProjects)
cboProjectModel - looks up data in a value list ("DM";"EM";"FM";"TEST")
I want the cboProjectCard to filter the options by what has been selected in
cboProject and cboProjectModel
The first section works fine as in Project = " & Me.cboProject & _
but the second part produces a pop up box with the value i selected from
cboProjectModel as the label above the blank field. Example: If i selected
FM it would show FM above the text entry field of the pop up box. Now If i
then type in DM into the text entry field of the pop up box FM is shown as
what was selected in the cboProjectModel however the cboProjectsCard lists
the options for the DM.
Below is the code i'm using to do this - what am i doing wrong?
Private Sub cboProjectModel_AfterUpdate()
Me.cboProjectCard.RowSource = "SELECT Card FROM" & _
" tblProjectCards WHERE Project = " & Me.cboProject & _
" AND Model = " & Me.cboProjectModel & _
" ORDER BY ProjectCard"
Me.cboProjectCard = Me.cboProjectCard.ItemData(0)
End Sub
Cheers
Terry
cboProjectModel
cboProjectCard
cboProject - looks up projects in a table (tblProjects)
cboProjectModel - looks up data in a value list ("DM";"EM";"FM";"TEST")
I want the cboProjectCard to filter the options by what has been selected in
cboProject and cboProjectModel
The first section works fine as in Project = " & Me.cboProject & _
but the second part produces a pop up box with the value i selected from
cboProjectModel as the label above the blank field. Example: If i selected
FM it would show FM above the text entry field of the pop up box. Now If i
then type in DM into the text entry field of the pop up box FM is shown as
what was selected in the cboProjectModel however the cboProjectsCard lists
the options for the DM.
Below is the code i'm using to do this - what am i doing wrong?
Private Sub cboProjectModel_AfterUpdate()
Me.cboProjectCard.RowSource = "SELECT Card FROM" & _
" tblProjectCards WHERE Project = " & Me.cboProject & _
" AND Model = " & Me.cboProjectModel & _
" ORDER BY ProjectCard"
Me.cboProjectCard = Me.cboProjectCard.ItemData(0)
End Sub
Cheers
Terry