G
Guest
I am have two tables that are related by the fields CategoryID and Category_ID.
Downtime is a subform in "1 EVENT TABLE" form (the names are not of my
choosing).
My objective is to have the user select from the combo box "Cat_desc" the
value Cat_desc, which corresponds to CategoryID Both Cat_desc and Category
ID are in the table "Cat_desc". The values that show up in the combo box
"Breakdown_Description" are filtered so that the user only sees values from
the table "Breakdown_code" where Category_ID is equal to the Category ID of
the Cat_desc in the first combo box.
When using the following code, I get a box asking me to enter the parameter
value Forms!1 EVENT TABLE!Downtime.Form.Cat_desc.
Why is this?
Private Sub Breakdown_Description_Enter()
Dim strSQL As String
strSQL = "SELECT Breakdown_code.Breakdown_Description,
Breakdown_code.Breakdown_ID, Breakdown_code.Category_ID" & _
" FROM Breakdown_code " & _
"WHERE ((Breakdown_code.Category_ID) = Forms![1 EVENT
TABLE]![Downtime].Form.CategoryID)"
Me.Breakdown_Description.RowSource = strSQL
End Sub
Private Sub Cat_desc_Enter()
Dim strSQL As String
strSQL = "SELECT BREAKDOWN_CAT.Cat_desc, BREAKDOWN_CAT.CategoryID" & _
" FROM BREAKDOWN_CAT "
Me.Cat_desc.RowSource = strSQL
End Sub
Thank you for your assistance
Downtime is a subform in "1 EVENT TABLE" form (the names are not of my
choosing).
My objective is to have the user select from the combo box "Cat_desc" the
value Cat_desc, which corresponds to CategoryID Both Cat_desc and Category
ID are in the table "Cat_desc". The values that show up in the combo box
"Breakdown_Description" are filtered so that the user only sees values from
the table "Breakdown_code" where Category_ID is equal to the Category ID of
the Cat_desc in the first combo box.
When using the following code, I get a box asking me to enter the parameter
value Forms!1 EVENT TABLE!Downtime.Form.Cat_desc.
Why is this?
Private Sub Breakdown_Description_Enter()
Dim strSQL As String
strSQL = "SELECT Breakdown_code.Breakdown_Description,
Breakdown_code.Breakdown_ID, Breakdown_code.Category_ID" & _
" FROM Breakdown_code " & _
"WHERE ((Breakdown_code.Category_ID) = Forms![1 EVENT
TABLE]![Downtime].Form.CategoryID)"
Me.Breakdown_Description.RowSource = strSQL
End Sub
Private Sub Cat_desc_Enter()
Dim strSQL As String
strSQL = "SELECT BREAKDOWN_CAT.Cat_desc, BREAKDOWN_CAT.CategoryID" & _
" FROM BREAKDOWN_CAT "
Me.Cat_desc.RowSource = strSQL
End Sub
Thank you for your assistance