I am trying to cascade three combo boxes (Area>Bone>FracDesc1) and I have three tables (tblArea, tblBone, tblFracDesc1) that I am working with. I am able to connect the first two combo boxes so that when I select a value in the Area combo box, it filters the choices for the Bone combo box. However, when I select the value in the Bone combo box, I get a pop up saying "Enter Parameter Value." I cannot figure out how to get the Bone combo box to filter for the FracDesc1 combo box. Here is my Code:
Private Sub cboArea_AfterUpdate()
' Update the row source of the cboBone combo box
' when the user makes a selection in the cboArea
' combo box.
Me.cboBone.RowSource = "SELECT Bone FROM" & _
" tblBone WHERE Area = " & _
Me.cboArea & _
" ORDER BY ID"
Me.cboBone = Me.cboBone.ItemData(0)
Me.cboBone.Requery
End Sub
Private Sub cboBone_AfterUpdate()
' Update the row source of the cboFracDesc1 combo box
' when the user makes a selection in the cboBone
' combo box.
Me.cboFracDesc1.RowSource = "SELECT FracDesc1 FROM " & _
" tblFracDesc1 WHERE Bone = " & _
Me.cboBone & _
" ORDER BY ID"
Me.cboFracDesc1 = Me.cboFracDesc1.ItemData(0)
Me.cboFracDesc1.Requery
End Sub
Any help would be greatly appreciated!
Private Sub cboArea_AfterUpdate()
' Update the row source of the cboBone combo box
' when the user makes a selection in the cboArea
' combo box.
Me.cboBone.RowSource = "SELECT Bone FROM" & _
" tblBone WHERE Area = " & _
Me.cboArea & _
" ORDER BY ID"
Me.cboBone = Me.cboBone.ItemData(0)
Me.cboBone.Requery
End Sub
Private Sub cboBone_AfterUpdate()
' Update the row source of the cboFracDesc1 combo box
' when the user makes a selection in the cboBone
' combo box.
Me.cboFracDesc1.RowSource = "SELECT FracDesc1 FROM " & _
" tblFracDesc1 WHERE Bone = " & _
Me.cboBone & _
" ORDER BY ID"
Me.cboFracDesc1 = Me.cboFracDesc1.ItemData(0)
Me.cboFracDesc1.Requery
End Sub
Any help would be greatly appreciated!