98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » Unique identifiers
Unique identifiers
Resolved · Low Priority · Version 2003
Izaskun has attended:
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course
Unique identifiers
can we have more than one key field in the same table
RE: unique identifiers
Hello Izaskun ,
Hope you enjoyed your Microsoft Access course with BEST STL Training.
Thank you for your question regarding Unique identifiers.
In situations where you can't guarantee the uniqueness of any single field, you may be able to designate two or more fields as the primary key. The most common situation where this arises is in the table used to relate two other tables in a many-to-many relationship.
For example, an Order Details table can relate the Orders and Products tables. Its primary key consists of two fields: OrderID and ProductID. The Order Details table can list many products and many orders, but each product can only be listed once per order, so combining the OrderID and ProductID fields produces an appropriate primary key.
Each product can be listed only once per order.
Another example would be an inventory database that uses a field part number of two or more fields (part and subpart).
If you are in doubt about whether you can select an appropriate combination of fields for a multiple-field primary key, you should probably add an AutoNumber field and designate it as the primary key instead. For example, combining FirstName and LastName fields to produce a primary key is not a good choice, since you may eventually encounter duplication in the combination of these two fields.
In a multiple-field primary key, field order may be important to you. The fields in a multiple-field primary key are sorted according to their order in table Design view. You can change the order of the primary key fields in the Indexes window.
I hope this resolves your question. If it has, please mark this question as resolved.
If you require further assistance, please reply to this post.
Or perhaps you have another Microsoft Office question?
Have a great day.
Regards,
Richard
Microsoft Office Specialist Trainer
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Compact database automoaticallyTo ensure optimal performance, you should compact and repair your |