Results 1 to 6 of 6
  1. #1
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153

    Question How do I handle Duplicate members in a table?

    I am putting together a "Clients" table and I am wanting some advice on what is the best way to handle Clients with the same name.



    For example:

    Here are a few fields from my "Clients table":

    ClientID
    Fname
    Mname
    Lname
    DateOfBirth


    I was thinking of making a unique index for first and last, but then i thought, what if I come across 2 John Smith's?

    I am sure there is a professional way of handling this, but Im not sure what the norm is.

    -SHould I make a unique index for Fname, Mname, & Lname?
    -SHould I make a unique index for Fname, Lname, & DateOfBirth?

    I would like to know what is the norm when storing people in a table and the best way to prevent duplicate clients from being entered.

  2. #2
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    You can't, based on names alone.
    This is why company's have personell number, and country's social security numbers.
    They are unique and thus no two records are alike.

    I see you have clientID, that should be a unique number to identify your clients.

    You can however look for this number by asking first, last names and date of birth.

  3. #3
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    I agree with Jeroen. It's a bad idea to make a PK based on names (unless the db is very small and static like keeping track of friends/family or something, and even then I would hesitate). Having an autonumber PK would be the simplest and more robust than one based on names.

  4. #4
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153
    Yeah but the "ClientID" is an auto number.. so what if John Smith signs up for an event jan 1st then 8 months later john smith signs up for another event, how can I prevent entering him as 2 different clients when in fact he is already in their?




    Quote Originally Posted by KingOf206 View Post
    I am putting together a "Clients" table and I am wanting some advice on what is the best way to handle Clients with the same name.

    For example:

    Here are a few fields from my "Clients table":

    ClientID
    Fname
    Mname
    Lname
    DateOfBirth


    I was thinking of making a unique index for first and last, but then i thought, what if I come across 2 John Smith's?

    I am sure there is a professional way of handling this, but Im not sure what the norm is.

    -SHould I make a unique index for Fname, Mname, & Lname?
    -SHould I make a unique index for Fname, Lname, & DateOfBirth?

    I would like to know what is the norm when storing people in a table and the best way to prevent duplicate clients from being entered.

  5. #5
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    I never said it should be an autoID number.
    When a client calls you check if there is a John Smith in your database using a filter (unbound textboxes in the header of your form). Once you confirm that he is in fact the John Smith your looking for you know his ClientId because that number is in his record.

    This is exactly how big companys work. Tiu call them and they will ask for your client ID. Most people dint kniw their ID so they will ask you things like name, date of birth and zipcode and adress.

    The ID number is used to tie records together.
    You will have to assign each client a unique number.

    When you then want to know wich products your client has ordered you base it on the clientID.
    When running reports or querys you know for cenrtain that all records belong to the same client and nit some other John Smith.
    You simply refer to the number rather then a complicated combination of personalia

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I would keep the ClientID PK autonumber.
    If you may get duplicates with LName & FName and MName, I would add DOB a create a unique composite index.
    That will prevent duplication on the combination FName, Mname, LName and DOB.
    The database software will use ClientID as PK and for relationships with other tables. The unique composite index will prevent the duplicates you mentioned.

    Good luck.

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

Similar Threads

  1. how do I handle a changing lookup table?
    By jrg24 in forum Access
    Replies: 6
    Last Post: 06-03-2015, 03:47 PM
  2. search and edit members
    By Mohammadsharif in forum Access
    Replies: 3
    Last Post: 04-08-2015, 07:36 AM
  3. All family members with one address
    By Grams in forum Access
    Replies: 5
    Last Post: 08-25-2014, 05:51 PM
  4. Replies: 24
    Last Post: 02-04-2014, 07:26 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