Index

G

Guest

Does anyone now how to make an index based on two fields. I want the index
to be unique based on the combination of ID and Company.

Thanks.

Ty
 
B

Brendan Reynolds

Open the table in design view and choose Indexes from the View menu. In
Indexes window, in the first blank row, enter a name for your index in the
Index Name Column. In the Field Name column, select the first of your two
fields. Now move down to the next row, leave the Index Name column empty,
and in the Field Name column, select the second of the two fields.

You can add up to ten fields in this way, as long as you leave the Index
Name column empty, they will remain part of the same index. As soon as you
enter a different index name, that starts a new index.

To make the index unique, select the first row in that index, and then
select 'Yes' in the box labelled 'Unique' down in the bottom left corner of
the Indexes window.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top