-
1
- #1
Hi everyone I'm pretty new to MS Access 2000 and I have a question. Why should an AutoNumber field NOT be used as a primary key? I ran across the following info below on a web site. Can you all enlighten me please.
Thanks so much in advance for your time.
Each table, that might be used as a master in a relationship with another table (detail table), should have a field that is a unique numeric identifier for each record. Typically this unique numeric identifier is an auto-number field in Access. Make sure it is set to long integer data type. An example would be Employee_ID in a table of employees. Make this field indexed (no duplicates).
Almost never use this auto-number field as the primary key of the table.
Aside: If you are thinking of hiring an Access programmer or consultant ask to see a screen shot of a relationship diagram from an Access database he/she has built. If you see an autonumber ID field in bold then ask them 'what will prevent two records with the same data getting into this table?' If they can't give you a good answer then don't hire them.
Thanks so much in advance for your time.
Each table, that might be used as a master in a relationship with another table (detail table), should have a field that is a unique numeric identifier for each record. Typically this unique numeric identifier is an auto-number field in Access. Make sure it is set to long integer data type. An example would be Employee_ID in a table of employees. Make this field indexed (no duplicates).
Almost never use this auto-number field as the primary key of the table.
Aside: If you are thinking of hiring an Access programmer or consultant ask to see a screen shot of a relationship diagram from an Access database he/she has built. If you see an autonumber ID field in bold then ask them 'what will prevent two records with the same data getting into this table?' If they can't give you a good answer then don't hire them.