Check for duplicate but accept if empty
I hope someone can help me--
I have a form field that is for a UPC code, but it is NOT a required field (if it is unknown then left blank). However, when the same UPC is entered (duplicate entry) I want it to check to see if the Value $ is the same, and if it is warn the user and say that it already exists in the database. But if the Value is different, then the UPC can be a duplicate entry.
This is necessary because sometimes our data uses the same UPC code but the $ value will be different so they are actually different records.
I've also selected "no duplicate records" but that will not allow for it to be left empty multiple times, is that correct? Is there a way to allow for empty duplicate records?
Is this possible?
Can someone help me with the code necessary to achieve this?
Thank you in advance,
R--