Results 1 to 5 of 5

Thread: More than one field duplicate criteria

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    132

    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”

  2. #2
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    132

    Re: More than one field duplicate criteria

    Thanks for the reply
    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?

  4. #4
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    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.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2007
    Posts
    132

    Re: More than one field duplicate criteria

    OK thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width