One-to-One realtionship

G

Guest

This seems to be easy but I struggle.

The data I would like to work with are flat. In order to have a better
structure, I designed several tables with a one-to-one relationships with
"enforcing referential integrity". The primary key is a text field.
In order to enter data I created a form with several subforms (for each
table). The main form contains the person's name and person's ID (which is
the primary key).
Now the problem: After entering the name and ID, I would like to enter data
in the subform but I always get the error "You cannot add or change a record
because a related record is required in tabe 'subtable name'.
How to solve this? I do not want to disable the referential integrity
because deleting a person should automaticlly delete this persons data in all
related tables.
I have a presentation tomorrow morning. Please help! (Or let me know if you
need more information; I could email you my little database)
Thanks in advance, Silke
 
C

Chaim

How are the subforms linked to the main form? Check the subform properties
(on the Data tab) to be sure that the Master and Child link fields are set
properly. It is not sufficient to simply have the relationship specified.
The link fields also have to be set.

Good Luck!
 
G

Guest

This was the hint. Thanks a lot!
Silke



Ken Sheridan said:
You might possibly have set up the relationships the wrong way round. Even
one-to-one relationships are directional; they are really one-to-(zero or
one). Make sure that the relationship is FROM the 'names' table TO each of
the other tables and not vice versa. In the relationships dialogue the
'names' table should be on the left hand side and the other table on the
right.
 
G

Guest

You might possibly have set up the relationships the wrong way round. Even
one-to-one relationships are directional; they are really one-to-(zero or
one). Make sure that the relationship is FROM the 'names' table TO each of
the other tables and not vice versa. In the relationships dialogue the
'names' table should be on the left hand side and the other table on the
right.
 

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