|
-
Feb 4th, 2008, 02:07 AM
#1
Thread Starter
Addicted Member
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”
-
Feb 4th, 2008, 02:50 AM
#2
Frenzied Member
Re: 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?
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.
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.
-
Feb 4th, 2008, 03:24 AM
#3
Thread Starter
Addicted Member
Re: More than one field duplicate criteria
Thanks for the reply
Can you provide some online link, if you have, related to the topic or can suggest best search texts at google for the same?
-
Feb 4th, 2008, 03:46 AM
#4
Frenzied Member
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.
-
Feb 4th, 2008, 03:57 AM
#5
Thread Starter
Addicted Member
Re: More than one field duplicate criteria
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|