No unique index found...

Oyster

Registered User.
Local time
Today, 14:12
Joined
Nov 16, 2004
Messages
34
Can't figure out why I can't create a one to many relationship between two tables:

TableA uses a composite key as its primery key (field1, field2).
The table has a unique index comprised of these keys. The index even has a name. The table also doesn't contain any duplicate information, so the fields comprising my Primary Key are unique. The table I'm joining tableA is unpopulated at this time.

TableA

FIELD1 FIELD2
99999 ABCDEFG
99999 HIJKLMNO

Any help will be greatly appreciated.
 
Are you sure the primary key for tblA is defined as two columns (you'll see keys next to each field that is participating in the pk when you look at the table in design view)? What is the key for the many-side table? Does the many-side table contain BOTH columns of tblA's primary key.

Sometimes when you have multi-field keys, it is easier to use a unique index for them and create an autonumber as the primary key.
 
I opened each table in Design View. One TableA can have many TableB's. Here's what I see:

TableA:
LabIndSampleCode (Has a key beside it), datatype is text
DateExtraction (Has a key beside it), datatype is text
Labbatchcode, datatype is text
MethodExtraction, datatype is text

TableB:
Labindsamplecode (has a key beside it), datatype is text
DateExtraction (has a key beside it), datatype is text
Locus (Has a key beside it), datatype is text
PrimerSet, datatype is text
 

Users who are viewing this thread

Back
Top Bottom