Table Relationships

  • Thread starter Thread starter Sandra
  • Start date Start date
S

Sandra

I have two tables relating where one houses data for
student information and one houses attendance for the
same students. One problem:

When I add or delete a record in one table it is not
showing the change in the other table. How can I make
this happen?

I have four fields relating in both tables.
Thanks for your help!!
 
Sandra,
Did you go into relationships and join your tables?
Then, you need to set referential integrity, and select
cascading update/delete.
 
I have tried this when I set the relationship but I keep
getting the following message:

No unique index found for the referenced field of the
primary table

The table is joined under number one option type and
relationship is one to one.

How can I correct?
 
Hi Sandra,
Your primary table should be the one housing the
student information. There should be a primary key on it
(Something that uniquely identifies each student).
Typically, ssn or student number are used. This field
should also be present in the attendance table. It would
serve as the linking data field.
Your attendance table should also have some sort of
unique identifier. Probably ssn/student number and
perhaps a date field. (Just guessing without knowing what
is on the table).
There shouldn't be duplicate fields present in both
tables, as this is redundant. If it is detail information
about the student, it should reside in the student table.
If it is relevant to attendance, it should be in that
table. If you can restructure your tables, I think you
can fix your problem.
If you want to post the list of fields in your tables,
I'm sure you can get some more detailed help.
 
Back
Top