I followed the example about Cascading combo boxes as much as I can and the debugger still gives me an error msg. Here's the code I wrote:
Private Sub cboOrg_AfterUpdate()
On Error Resume Next
cboClient.RowSource = "Select Clients.nomclient " & _
"FROM Clients " & _
"WHERE Clients.nomorg = '" & cboOrg.Value & "' " & _
"ORDER BY Clients.nomclient;"
End Sub
Private Sub Form_Current()
On Error Resume Next
' Synchronise org combo with existing clients
cboOrg = DLookup("[nomorg]", "Clients",
"[nomclient]='" & cboClient.Value & "'")
' Synchronise client combo with existing client
cboClient.RowSource = "Select Clients.nom_client " & _
"FROM Clients " & _
"WHERE Clients.nomorg = '" & cboOrg.Value & "' " & _
"ORDER BY Clients.nomclient;"
End Sub
My error msg comes up at this stage:
' Synchronise org combo with existing clients
I have:
tbl Clients
field1 nomclient
field2 nomorg
Just don't have a clue where my mistake is...
Thanks for your help.
Private Sub cboOrg_AfterUpdate()
On Error Resume Next
cboClient.RowSource = "Select Clients.nomclient " & _
"FROM Clients " & _
"WHERE Clients.nomorg = '" & cboOrg.Value & "' " & _
"ORDER BY Clients.nomclient;"
End Sub
Private Sub Form_Current()
On Error Resume Next
' Synchronise org combo with existing clients
cboOrg = DLookup("[nomorg]", "Clients",
"[nomclient]='" & cboClient.Value & "'")
' Synchronise client combo with existing client
cboClient.RowSource = "Select Clients.nom_client " & _
"FROM Clients " & _
"WHERE Clients.nomorg = '" & cboOrg.Value & "' " & _
"ORDER BY Clients.nomclient;"
End Sub
My error msg comes up at this stage:
' Synchronise org combo with existing clients
I have:
tbl Clients
field1 nomclient
field2 nomorg
Just don't have a clue where my mistake is...
Thanks for your help.