Duplicate Records

BillBee

Registered User.
Local time
Today, 11:13
Joined
Aug 31, 2008
Messages
137
I am working on an application related to Bird Breeding records. Each year an exhibitor must purchase rings which are fitted to each bird for identification. I cannot set the RingNo field in the Table to indexed and no duplicates because there is a possibility (very slim) that one could over be issued with the same number/s in a different year. Can a primary key be set to have a combination of two fields (in this case RingNo and Year) where no duplicates would occur. If so could some explanation be given as to how this would be created. Thanks.
 
Use a primary key that has nothing to do with anything (preferably autonumber). Put a Unique Index on the 2 fields you were referring to.

Better yet, normalize. A "ring" is a discrete thing I take it that is in no way associated to a bird in its natural environment. As such, you should be able to use it as a FK to multiple breeding records.
 
I have a primary key field "BirdID". Also a Field "RingNo" and a Field "Year". With this set up this way you can keep entering the same ring number and year as many times as you like and each time you do this the autonumber creates a new BirdID. What I want to achieve is to only be able to enter only one combination of RingNo and Year and if I accidently try to enter the same combination a message box would tell me that record already existed.
 

Users who are viewing this thread

Back
Top Bottom