I have a form (data from table1) and a subform (data from table2) in it. The tables have a one-to-many relationship.
To my surprise, MS Access lets you enter data into a sub-form before the master record is created.
So I searched and I found that the proper "solution" to my problem is to check "Enforce Referential Integrity"
Here 's my main source of reading
Unfortunately :-( It doesn't work. i.e. although I have a checkmark in "Enforce Referential Integrity" I can still create records to table2 without creating a "master" or "container" record.
Any ideas?
If I mark as "required" the common field between the tables and try to write data into subform, I get an error (3314 I think) and I can't ...get out (click outside the subform) to my main/container form!
P.S. I have found a (not so elegant) solution that hides the subform until the master record has created but I wonder why Referential Integrity doesn't working for me...
To my surprise, MS Access lets you enter data into a sub-form before the master record is created.
So I searched and I found that the proper "solution" to my problem is to check "Enforce Referential Integrity"
Here 's my main source of reading
Unfortunately :-( It doesn't work. i.e. although I have a checkmark in "Enforce Referential Integrity" I can still create records to table2 without creating a "master" or "container" record.
Any ideas?
If I mark as "required" the common field between the tables and try to write data into subform, I get an error (3314 I think) and I can't ...get out (click outside the subform) to my main/container form!
P.S. I have found a (not so elegant) solution that hides the subform until the master record has created but I wonder why Referential Integrity doesn't working for me...