Access 2016 Advanced

Access 2016

Lesson 6 - Working with Indexes

solution is to create a primary key index on both fields, which allows each item to appear only once on each order.

Procedures

1. Open the desired table in Design view. 2. Click the row selector to the left of the row containing the first field for the primary key. 3. Hold the [Ctrl] key and click the row selector for the second primary key field and release the [Ctrl] key.

4. On the Design tab in the Tools group click the Primary Key button

.

Step-by-Step

Create a multiple field primary key.

Open the Line Items table in Design view.

Steps

Practice Data

1. Click the row selector to the left of the row containing the first field for the primary key. The row is selected. 2. Hold the [Shift] key and click the row selector for the second primary key field and release the [Shift] key. The row is selected. 3. On the Design tab in the Tools group click the Primary Key button. A key symbol appears in the row selector next to each selected row.

Click the row selector to the left of the Order Number field in the Field Name column Hold [Shift] and click the row selector to the left of the Product ID field in the Field Name column and release [Shift]

Click

Open the Indexes dialog box and view the index you created. Close the Indexes dialog box then, close the table without saving the changes.

OFFICEPRO, Inc.

Page 73

Made with FlippingBook - Online magazine maker