Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having Problems Relating Tables Header and Subordinate

Status
Not open for further replies.

RBPM

IS-IT--Management
Jan 14, 2005
59
US
Good afternoon to the forum. Am experiencing difficulty in relating tables in the relationship view.

Here is my situation - Have 3 tables of which 2 are the ones that I wish to be subordinate to the one which I consider the master.

The table names are:
HDR - Master
SCP - Sub 1
NTR - sub 2

All three tables have the same 3 common fields with the same definition and data types in each of the three tables. In the master table these three fields (Name-number-date) are the primary key.

When I try to create the relationship in the view it works as long as I don't click the referential integrity (which I would like to do).

It gives me an error message that says Relationship must be on the same number of fields with the same data types.

If I dont click on the referential integrity it creates the relationship.

I dont get it. The fields in each table are defined the exact same - names types - everything.

Can anyone please help?

Thanks
 
referential integrity can only be established on single field relationships (I believe...)

so you would have to create a single PKey, say autonumber, and link to FKeys in your sub tables...

--------------------
Procrastinate Now!
 
Relational integrity DOES work with compound keys. You do, however, need to have a unique index on they key.
 
Thanks for the help and the direction have gotten it to work. One down 4,785 to go. thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top