Table Relationships

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!!
 
L

Les

Sandra,
Did you go into relationships and join your tables?
Then, you need to set referential integrity, and select
cascading update/delete.
 
S

Sandra

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?
 
L

Les

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top