nomeepk:
Not exactly what rabbit is after, what he is suggesting is a composite-indexed key. Because you have not indicated which version of Access you are using, I'll give you the ACC2010 instructions:
Open the table you wish to have the composite index on in desgin view.
A context ribbon for "Table Tools" should be open
"Show/Hide" group
"Indexes"
Once selected, the "Indexes:___" where ___ = table name dialog will open... for simplicty, let's call this the Indexes Table.
If you have a primary key, you will have one entry in the table... "PrimaryKey"
Now look at the two fields you want in the index, in this case say [order_date] and [customer_id]
In the Indexes Table, under the heading [Index Name] make a new entry, let's call it "idx_dailyorders"
under the heading [Field Name] same row as idx_dailyorders, select the first field.
Now on the next row, leave [Index Name]
BLANK; in the [Field Name] select the second field.
Now go back and select the index name
You will have a section at the bottom of the indexes table where you can set a few properties, in this case, Primary (if you already have a primary then = NO (I advise against composit keys for primary keys for
most uses - that is a subject of much debate) Unique = Yes (obvious - No?) Ignore Nulls = No
And there you have it
You can also do this via SQL in the query editor, however, you have to use SQL, not the standard editor view - and this is not for the faint-of-heart:
Create or modify tables or indexes by using a data-definition query