Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

unique identifiers

Forum home » Delegate support and help forum » Microsoft Access Training and help » Unique identifiers

Unique identifiers

ResolvedVersion 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

Access tip:

Run with the total

Often when creating reports with lists of transactions it can be useful to have a column which totals the transactions as the report progresses.

Using the Sum function gives the total for the whole group, not a running total.



Access provides an easy method of achieving a running total.



Click on the text box containing the data you wish to contain the running total.
Select the Data tab
Click in the Running sum option
Click the down arrow to view three options

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.