Preventing Dups for 2 fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I think the answer to this is simple, yet it keeps eluding me!

I have two fields in a table DEPARTMENT, and ROLE.

I need to prevent duplicate DEPARTMENT-ROLE entries.

For Example:

Rec DEPT ROLE
1 Payroll Clerk
2 Accounting Clerk <<< ENTRY WOULD BE OK >>
3 Payroll Clerk <<<NEED TO PREVENT THIS ENTRY>>>>

Thanks in advance for any help!
 
One way is to go into table design and add a compound index. Add a new
INDEX and give it a name. On the first row put your "Department" field and
on the second row, put your "ROLE" field and mark it to not allow
duplicates.
 
Perfect. - Thanks Rick!

Rick B said:
One way is to go into table design and add a compound index. Add a new
INDEX and give it a name. On the first row put your "Department" field and
on the second row, put your "ROLE" field and mark it to not allow
duplicates.
 

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

Back
Top