Issue with Tables

mitch97144

Registered User.
Local time
Today, 08:29
Joined
Sep 8, 2004
Messages
15
I have an issue updating a field in one table. The db consists of three tables at present (1-clubs 2-players 3-player history). When i add a player to the second table the field TEAMID (tb2) is updated with the teamID from table1. The problem i have is when a player history record is added the REGID field is updated in table3 but the TEAMID is not. How can i update this.
 

Attachments

Last edited:
Looking at the datasheet view of you tables, I have problems understanding what you wish to achieve. It seems all the tables contains a field of the type Autonumber, then it seems you're also using some other fields that seems to also be candidate keys, but we don't know what you've selected as primary key.

Since you have Autonumbers, they will uniquely identify each record in the tables, and carrying that field, and only that, will ensure the child records are matched with the correct parent record. If your Autonumber fields are also the primary keys, then again - do not carry over/update other fields. They will be availabe thru a join of the tables whenever needed anyway (in this case, the id of table2 could become the foreign key in table3).

Allthough there is nothing "technically" wrong in using a unique field, or a unique composite index (more than one field) that are not the primary key of a table to maintain relationship/referential integrity between two tables, the preferred method is using the primary key.

So I think, if some of the above thoughts/advice doesn't provide enough to get you started in the right direction, I think we'd need to know the primary keys of the tables.
 

Users who are viewing this thread

Back
Top Bottom