Linking Question

Gilrucht

Registered User.
Local time
Yesterday, 19:21
Joined
Jun 5, 2005
Messages
132
This is so basic I am almost embarrassed to ask but here goes. I have two subforms bound to a 8 field table. Subform 1 fills in 5 of the 8 fields and subform 2 fills in the other 3. I fill out my main form bound to Table1 then open subform1 and fill in the 5 fields. This subform is linked to my mainform by my Master-Chield fields.

Field 5 in form1 is a checkbox. If the box is checked code opens subform 2 to fill in the other 3 fields of the table. If the box is not checked the second subform does not open for that record. My question is how do I insure the record in my second subform, the popup form, is linked to the correct record in the first subform and to the correct record in my mainform. Is it automatic since both subforms are bound to the same table and the first subform is linked?
 
I would enter some data and run a query to see if the data is matching correctly, or check your table.

How many tables do you have? I guess I'm not understanding why you have subforms on a form that is based on the same table.
 
The reason for 2 subforms based on the same table is mainly for Real Estate Purposes. The table actually has more than 8 fields. The db is for my lawoffice. The table is a details table for autoaccidents-ie- Where Accident happened. Weather conditions. Speed limit, Traffic signals, Police Investigation(yes/No), Police Dept, Officer name, Traffic Citations, etc.
Since not all accidents are investigated I use 2 forms. The first is for for all the detail fields plus the police investigation checkbox. The second is for the the police investigation details. The checkbox controld whether this second form opens or not.
 
Hi Gilrucht,

You need to use some of your Access terms with care to avoid confusing us fuzzy old persons. ;) SubForms are forms that are located directly on other forms within SubFormControls. Forms that open because of something done on a form are simply other forms but *not* SubForms as we Access persons understand them.

I think the answer to your question is yes! :D
 
May not be normal?

Based on your description, it sounds like you might want to break the investigation info out into its own table. tblInvestigations would have a field fkAccidentID linking it to the accident record in tblAccidents. Just an idea...

RG, what do you think?

--Pondering Mac
 
I agree Mac. It will save disk space when there is no Police Investigation. Good catch.
 

Users who are viewing this thread

Back
Top Bottom