whitelockben
Registered User.
- Local time
- Today, 22:15
- Joined
- Jun 29, 2011
- Messages
- 25
I want a combobox based on the value of two other comboboxes but I am not sure how to write it in VB. I would have though something like:
However I am aware this is not correct, can someone help me with this please.
Thanks,
Ben
Code:
Private Sub cboT_AfterUpdate()
On Error Resume Next
cboC.RowSource = "Select DISTINCT tblCables.C " & _
"FROM tblCables " & _
"WHERE tblCables.T = '" & cboT.Value & "' " And "WHERE tblCables.D = '" & cboD.Value & "' " & _
"ORDER BY tblCables.C;"
End Sub
However I am aware this is not correct, can someone help me with this please.
Thanks,
Ben