Creating an Index on Two fields

  • Thread starter Thread starter ChuckW
  • Start date Start date
C

ChuckW

Hi,

I have a table of patient information the includes:
DoctorNumber, PatientNuber, PatientName, InvoiceNumber,
and DateRecieved. There is no unique field. However, the
combination of PatientID and InvoiceNumber are unique.
How do I create an index on these two fields so that the
combination of the two would be unique and could not be
inputed twice?

Thanks,

Chuck
 
ChuckW said:
Hi,

I have a table of patient information the includes:
DoctorNumber, PatientNuber, PatientName, InvoiceNumber,
and DateRecieved. There is no unique field. However, the
combination of PatientID and InvoiceNumber are unique.
How do I create an index on these two fields so that the
combination of the two would be unique and could not be
inputed twice?

IN Table Design View go to...

View - Indexes

In the Indexes dialog enter the new index like...

IndexName PatientID
(no entry) InvoiceNumber

(then at the bottom)
Primary
Unique Yes
Ignore Nulls
 
Back
Top