Right, can't directly address a table like that.
Use domain aggregate function DLookup() or open a Recordset object.
Something like:
Code:
If Not IsNull(DLookup("CustomerPartNumber", "tblCustomerPartNumbers", "[StationID]='" & CName & "' AND [ProductID]='" & PID & "' AND [Description]='" & Desc & "'")) Then
MsgBox "Customer Part Number Exists"
Else
MsgBox "Customer Part Number does not Exist"
End If
Where are the variables CName, CustPN, PID, Desc declared and populated?
If you have CustPN why would you need other criteria?
Why not use a combobox that only offers existing CustomerPartNumber values for user to choose from?
Please use CODE tags when posting code snips. Use the # icon on post edit menu.