T
Tal
I have the following code on a form
Private Sub cboSearchDonor_AfterUpdate()
Dim strWhere As String
Const strcStub = "SELECT * FROM qryClientsandClientAddresses "
If Not IsNull(Me.cboSearchDonor) Then
strWhere = "WHERE (tblClients.keyClient = " & Me.cboSearchDonor & ")"
End If
Forms![frmEditDonors].RecordSource = strcStub & strWhere
Dim strAddress As String
strAddress = "SELECT [qryClientsandClientAddresses].[keyClientAddress],
[qryClientsandClientAddresses].[compAddress] " & _
"FROM qryClientsandClientAddresses " & _
"WHERE [qryClientsandClientAddresses].[tblClients.keyClient] = " &
Me.cboSearchDonor.Value
Me.cboSelectAddress.RowSource = strAddress
Me.cboSelectAddress.Requery
End Sub
The first part is fine, the record source is working, except select
cboSelectAddress is giving me the syntax error missing operator error. I have
used this code any number of times, so I am feeling pretty darn foolish. Any
help much much appreciated.
Cheers,
Tal
Private Sub cboSearchDonor_AfterUpdate()
Dim strWhere As String
Const strcStub = "SELECT * FROM qryClientsandClientAddresses "
If Not IsNull(Me.cboSearchDonor) Then
strWhere = "WHERE (tblClients.keyClient = " & Me.cboSearchDonor & ")"
End If
Forms![frmEditDonors].RecordSource = strcStub & strWhere
Dim strAddress As String
strAddress = "SELECT [qryClientsandClientAddresses].[keyClientAddress],
[qryClientsandClientAddresses].[compAddress] " & _
"FROM qryClientsandClientAddresses " & _
"WHERE [qryClientsandClientAddresses].[tblClients.keyClient] = " &
Me.cboSearchDonor.Value
Me.cboSelectAddress.RowSource = strAddress
Me.cboSelectAddress.Requery
End Sub
The first part is fine, the record source is working, except select
cboSelectAddress is giving me the syntax error missing operator error. I have
used this code any number of times, so I am feeling pretty darn foolish. Any
help much much appreciated.
Cheers,
Tal