J
JohnLute
I have a combo box double click event that's giving me fits:
Private Sub SupplierID_DblClick(Cancel As Integer)
If IsNull(Me!SupplierID) Then
' no supplier ID selected; show all ...
DoCmd.OpenForm "frmPKSuppliers"
Else
' Show selected supplier ID.
' First, open frmPKSuppliers to show the supplier ...
DoCmd.OpenForm "frmPKSuppliers", _
WhereCondition:="txtSupplierName=""" & _
Me!SupplierID.Column(1) & """"
' Now position the subform, sfrmSupplierIDs,
' to the selected ID ...
With Forms!frmPKSuppliers!sfrmSupplierIDs.Form
End With
End If
End Sub
I used "><" to mark what the debugger finds as incorrect. Here's the form's
SQL:
SELECT tblSupplierIDs.txtSupplierID, tblSupplierNames.txtSupplierName,
tblSupplierIDsAddresses.City, tblSupplierIDsAddresses.StateOrProvince
FROM tblSupplierNames INNER JOIN (tblSupplierIDs INNER JOIN
tblSupplierIDsAddresses ON tblSupplierIDs.txtSupplierID =
tblSupplierIDsAddresses.txtSupplierID) ON tblSupplierNames.txtSupplierName =
tblSupplierIDs.txtSupplierName;
I can't see what the data type mismatch is. Can anyone help, please?
Thanks!
Private Sub SupplierID_DblClick(Cancel As Integer)
If IsNull(Me!SupplierID) Then
' no supplier ID selected; show all ...
DoCmd.OpenForm "frmPKSuppliers"
Else
' Show selected supplier ID.
' First, open frmPKSuppliers to show the supplier ...
DoCmd.OpenForm "frmPKSuppliers", _
WhereCondition:="txtSupplierName=""" & _
Me!SupplierID.Column(1) & """"
' Now position the subform, sfrmSupplierIDs,
' to the selected ID ...
With Forms!frmPKSuppliers!sfrmSupplierIDs.Form
"txtSupplierID=" & Me.SupplierID.Column(0)<.Recordset.FindFirst _
End With
End If
End Sub
I used "><" to mark what the debugger finds as incorrect. Here's the form's
SQL:
SELECT tblSupplierIDs.txtSupplierID, tblSupplierNames.txtSupplierName,
tblSupplierIDsAddresses.City, tblSupplierIDsAddresses.StateOrProvince
FROM tblSupplierNames INNER JOIN (tblSupplierIDs INNER JOIN
tblSupplierIDsAddresses ON tblSupplierIDs.txtSupplierID =
tblSupplierIDsAddresses.txtSupplierID) ON tblSupplierNames.txtSupplierName =
tblSupplierIDs.txtSupplierName;
I can't see what the data type mismatch is. Can anyone help, please?
Thanks!