I have seen several posts on finding duplicate records where
If DCount([productid], "order details", "[orderid] = '" & Me![productid] & "'"
> 0 Then
MsgBox "Product number aleady exists"
However I have two fields, product ID and Order ID. There can be multiple product id's under one orderId. However because it looks at table and sees similar product id's under different order ID's I still receive the message box. Whenever trying to enter a product ID into a separate record. Am I on the right track or can anyone help me with a different solution.
If DCount([productid], "order details", "[orderid] = '" & Me![productid] & "'"
MsgBox "Product number aleady exists"
However I have two fields, product ID and Order ID. There can be multiple product id's under one orderId. However because it looks at table and sees similar product id's under different order ID's I still receive the message box. Whenever trying to enter a product ID into a separate record. Am I on the right track or can anyone help me with a different solution.