More than one field duplicate criteria
Is there any way to check a duplicate entry based on more than one field records without setting primary key in Access Database?
I am saving data to Access database and I want that if any entry is there for field 1, field 3 and field 5 then a msgbox should popup that “Entry already exist”
Re: More than one field duplicate criteria
Quote:
Is there any way to check a duplicate entry based on more than one field records without setting primary key in Access Database?
The answer is yes. Infact when dealing with more complex db you would come across situations where simple unique ID will not work as a PK, then the standard practice is to combine more than one field to act as a PK. Check some book on rdbms you should get more info.
Quote:
I am saving data to Access database and I want that if any entry is there for field 1, field 3 and field 5 then a msgbox should popup that “Entry already exist”
See my reply to your post Duplicate entry now instead of checking for one field in the query use AND operator (you can also use nested IFs if you prefer) and check the return value.
Re: More than one field duplicate criteria
Thanks for the reply
Quote:
Check some book on rdbms
Can you provide some online link, if you have, related to the topic or can suggest best search texts at google for the same?
Re: More than one field duplicate criteria
There are quiet a few downloadbale books on RDBMS. Iam not sure whether I can post the link here I'll send you the link to youR PM.
Re: More than one field duplicate criteria