3 fields together unique/no duplicates?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: JBowler (none_at_none.none)
Date: 09/21/04


Date: Tue, 21 Sep 2004 11:57:47 +0100

Is it possible to make a combination of 3 fields be unique? I know you can
have the ID (autonumber) be unique or have a field set to be indexed and not
allow duplicates but I need to use 3 fields.

My scenario is a table (tblPeople) with Fname, Lname and postcode. I do not
want any duplicate people in my tblPeople. They all have multiple linked
records in tblProjects. The problem is that someone doing data entry keeps
creating duplicate people entries when they exist already. Can I set these 3
to be unique together? Not as individual uniques.

Would it be easier to make a field in the tblPeople that is a combination of
Fname Lname Postcode and that be unique? Then on the form it would use some
code to make the combination entered into that field. I could run a query to
make the 3000+ records have that combination field so its all up to date.

What is my best approach? Any help or thoughts are appreciated. Many thaks.

JBowler



Relevant Pages

  • Re: 3 fields together unique/no duplicates?
    ... > have the ID be unique or have a field set to be indexed and ... > My scenario is a table (tblPeople) with Fname, ... > creating duplicate people entries when they exist already. ... > Fname Lname Postcode and that be unique? ...
    (microsoft.public.access.tablesdbdesign)
  • Re: duplicating records that contain subforms
    ... Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia ... it won't duplicate a record's relationships. ... Would someone show me a function that takes an ID from tblPeople as ... And tblFaves records that John Smith likes tblBooks ID 1 ...
    (microsoft.public.access.forms)
  • duplicating records that contain subforms
    ... it is convenient to occasionally duplicate a record ... Would someone show me a function that takes an ID from tblPeople as ... And tblFaves records that John Smith likes tblBooks ID 1 ...
    (microsoft.public.access.forms)
  • Re: Duplicate SSN
    ... Population has grown beyond a query to quickly see if the new entry is a duplicate. ... How do I set up a code to show a msgBox with SSN that start with the first digit and continue to match untill either it is a new or the duplicate can be seen on the msgBox? ... I may be missing the point here but if you have the field set to no dups then they won't be allowed, ...
    (microsoft.public.access.gettingstarted)