Hi,
I have been trying to make a combo box dependent on the previous combo box selection. Originally i had tried using separate tables for different selections in the first combo box, but efforts to get this working came to nothing. So I decided to have a single table for all of the dependent row source information.
the tables:
Tblparmedchoices (includes a column for status type and relevant substatus)
cboStatustype (first combo box, which the second's row source is dependant upon)
cboSubstatus (dependent combo box)
heres the code ive been trying:
Private Sub cboStatustype_AfterUpdate()
On Error Resume Next
cboSubstatus.RowSource = "Select tblparmedchoices " & _
"FROM tblparmedchoices " & _
"WHERE tblparmedchoices.Statustype = '" & cboStatustype.Value & "' " & _
"ORDER BY tblparmedchoices.Substatus;"
cboSubstatus.Requery
End Sub
help, this is central to my database working :-s
thanks in advance
I have been trying to make a combo box dependent on the previous combo box selection. Originally i had tried using separate tables for different selections in the first combo box, but efforts to get this working came to nothing. So I decided to have a single table for all of the dependent row source information.
the tables:
Tblparmedchoices (includes a column for status type and relevant substatus)
cboStatustype (first combo box, which the second's row source is dependant upon)
cboSubstatus (dependent combo box)
heres the code ive been trying:
Private Sub cboStatustype_AfterUpdate()
On Error Resume Next
cboSubstatus.RowSource = "Select tblparmedchoices " & _
"FROM tblparmedchoices " & _
"WHERE tblparmedchoices.Statustype = '" & cboStatustype.Value & "' " & _
"ORDER BY tblparmedchoices.Substatus;"
cboSubstatus.Requery
End Sub
help, this is central to my database working :-s
thanks in advance