Results 1 to 5 of 5
  1. #1
    kilosierra71 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    6

    Prevent Duplicate Entry

    Hello all, from a Bound Form i'm looking for a simple way to prevent a user from entering a customer phone number into a table if that phone number already exists. Basically, if the phone number already exists in the table, I would like to 1) prevent that entry from occuring and 2) get a msg to pop up that reads 'Phone Number Already Exists'. Is there a Table Property or Form Property that I can set to achieve this? Thanks K

  2. #2
    refryguy is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2011
    Location
    Denver, CO
    Posts
    5
    Open up your table in design view. In the Field Properties down below on the General Tab, where it says Indexed click Yes and this will prevent duplicates. Make sure you are on the field that corresponds. ie. Phone Number

    Refry

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I'm going to add something here. What happens if someone changes their phone number and a new person gets the old person's phone number? Or are you talking about a phone number for the same person being entered more than once?

  4. #4
    kilosierra71 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    6
    Thanks refryguy, I figued it was that easy. However, i'm getting an error msg when I try to change Indexed from 'Yes - Duplicates OK' to 'Yes - No Duplicates'. The error msg says, in part......"the changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship...."

    I went thru the table and removed the duplicates, saved the table and tried changing the Indexing again. Got the same error. Any clues? Thanks

  5. #5
    kilosierra71 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    6
    Thanks refryguy, I figued it was that easy. However, i'm getting an error msg when I try to change Indexed from 'Yes - Duplicates OK' to 'Yes - No Duplicates'. The error msg says, in part......"the changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship...."

    I went thru the table and removed the duplicates, saved the table and tried changing the Indexing again. Got the same error. Any clues? Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Dcount prevent duplicate
    By ayamali in forum Programming
    Replies: 20
    Last Post: 04-16-2013, 09:31 PM
  2. Scanning table for duplicate entry from VBA
    By Buakaw in forum Programming
    Replies: 6
    Last Post: 03-08-2011, 07:29 PM
  3. Replies: 2
    Last Post: 02-12-2011, 09:54 PM
  4. MsgBox for duplicate entry
    By usmcgrunt in forum Programming
    Replies: 3
    Last Post: 11-09-2010, 08:48 AM
  5. Prevent Duplicate Values on Combination of Two Fields
    By LornaM in forum Database Design
    Replies: 8
    Last Post: 05-05-2009, 11:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums