View Full Version : Relationships


misslee1888
07-11-2003, 08:42 AM
I was wondering if anyone could help:

I have a form (Main1) with a tab control on it, on the second page of the tab control on this form I have a sub form (Main Sub) that has another tab control on it and on the first tab of this control I have yet another sub form ( Sub Sub).

The problem is this, when I enter details into the very last subform, when the information is entered in and the form is reopened, it does not show any entries. However, when I go to the table that this form is referenced to the infor is there.


I am sure that there is a problem with the relationships, but I just dont know where to start.

Does anyone know how the relationships should be between these forms

Pat Hartman
07-11-2003, 11:13 AM
Could be that the subform has its data entry property set to yes. This makes it an add only form although it will still let you scroll to and change any record you added since the form was opened but when the form is closed, that set of data is no longer available although it is in the db.

The other possibility is more serious. To start with make sure that you have relationships defined and have checked the enforce referential integrity box. If you already have data in the table and Access will not let you check the box, you'll need to fix the bad data first. Then go back and check the box. Once that is taken care of, you can fix the form. The master/child links are probably not properly set.

misslee1888
07-14-2003, 01:05 AM
Thanks pat, it seemed to be the easier suggestion, I set the data entry to no and it seems to work fine now.


Thanks for your help

Lisa

misslee1888
07-16-2003, 03:13 AM
I am going to query my main table, (main from) however as i have sub forms attached to this table and have tables attached to these subforms. When I run this query, 1 record should be brought back, but this record is brought back 39 times instead of one.

Any idea how this can be resolved.

Pat Hartman
07-16-2003, 11:26 AM
The query for the main form should NOT include the many-side tables. Remove them, that is what is causing the duplication.