J
JohnLute
Here's the error message I'm getting:
The specified field <field> could refer to more than one table listed in the
FROM clause of your SQL statement. (Error 3079)
Here's the row source of the relative combo box:
SELECT tblCustomerIDs.txtCustomerID, tblCustomerNames.txtCustomerName,
tblCustomerIDs.City1, tblCustomerIDs.StateOrProvince1 FROM tblCustomerNames
INNER JOIN tblCustomerIDs ON tblCustomerNames.txtCustomerName =
tblCustomerIDs.txtCustomerName ORDER BY tblCustomerIDs.txtCustomerID;
Here's the code for the combo box:
Private Sub cbRejectingCustomer_DblClick(Cancel As Integer)
If IsNull(Me!cbRejectingCustomer) Then
' no customer ID selected; show all ...
DoCmd.OpenForm "frmCustomers"
Else
' Show selected customer ID.
' First, open frmCustomers to show the customer ...
DoCmd.OpenForm "frmCustomers", _
WhereCondition:="txtCustomerName='" & _
Me!cbRejectingCustomer.Column(1) & "'"
' Now position the subform, sfrmCustomerIDs,
' to the selected ID ...
With Forms!frmCustomers!sfrmCustomerIDs.Form
.Recordset.FindFirst _
End If
End Sub
The debugger points to the code lines I placed in ><.
Anyone see why I'm getting this error message...?
THANKS!
The specified field <field> could refer to more than one table listed in the
FROM clause of your SQL statement. (Error 3079)
Here's the row source of the relative combo box:
SELECT tblCustomerIDs.txtCustomerID, tblCustomerNames.txtCustomerName,
tblCustomerIDs.City1, tblCustomerIDs.StateOrProvince1 FROM tblCustomerNames
INNER JOIN tblCustomerIDs ON tblCustomerNames.txtCustomerName =
tblCustomerIDs.txtCustomerName ORDER BY tblCustomerIDs.txtCustomerID;
Here's the code for the combo box:
Private Sub cbRejectingCustomer_DblClick(Cancel As Integer)
If IsNull(Me!cbRejectingCustomer) Then
' no customer ID selected; show all ...
DoCmd.OpenForm "frmCustomers"
Else
' Show selected customer ID.
' First, open frmCustomers to show the customer ...
DoCmd.OpenForm "frmCustomers", _
WhereCondition:="txtCustomerName='" & _
Me!cbRejectingCustomer.Column(1) & "'"
' Now position the subform, sfrmCustomerIDs,
' to the selected ID ...
With Forms!frmCustomers!sfrmCustomerIDs.Form
.Recordset.FindFirst _
End With"txtCustomerID=" & Me!cbRejectingCustomer.Column(0)<
End If
End Sub
The debugger points to the code lines I placed in ><.
Anyone see why I'm getting this error message...?
THANKS!