How do I create a unique index?

W

Will Rogers

I am creating a database for my company which is a subset of many companies.
We do work for all of them so often time there are duplicate Sales Order
Numbers. As such I am using a multiple primary key index for my sales order
table of "company number" and "sales order number." On my time entry table I
have sales order number, company number, employee number, and date as the
primary keys. The problem arises when I try to create a relationship between
the two sales order entries and then select "enforce referential integrity" I
get an error message saying no unique index was found. How can this be true
if I do not get any errors relating to the primary keys? I have checked both
tables to make sure that one doesn't contain more/less numbers than the
other.

I am also having the same issue between my Customer ID table and my Sales
Orders table. I can E.R.I. between the two customerID rows for each table.
Those are the only two areas where I am having that problem. The rest of the
related tables allow me to E.R.I. including atleast one entry from each of
the troublesome tables. Any ideas on how to make this work?
 
Top