DoCmd.OpenForm code to open a subform under the main form

Leo_Polla_Psemata

Registered User.
Local time
Today, 11:09
Joined
Mar 24, 2014
Messages
364
Hi there.
I have three tables, Tabl1, Tabl2, Tabl3, relation one to many.
One continues form (MainF) that contains the very basic data from Tabl1, Table2.
Another three forms that displays detailed info from Tabl1, Tabl2, Tabl3

Tabl1F
- Tabl2F
-- Table3F

We need to, review the summary data in MainF, click and go to desired record in detailed forms.

With this code i can jump from MainF form to Tabl2F form on specific record BUT i don't see info displayed in Tabl1F.
DoCmd.OpenForm "Tabl2F", acNormal, "", "[KeyField1]=[Forms]![MainF]![KeyField1]", , acNormal

If I use this code, I can jump from Mainf to Tabl1F but then i have to find manually the specific record on Tabl2F by clicking "nexr record".
DoCmd.OpenForm "Tabl1F", acNormal, "", "[KeyField2]=[Forms]![MainF]![KeyField2]", , acNormal

Is there any DoCmd.OpenForm code that would help, by clicking the KeyField1 in MainF to go to specific record in Tabl2F
but see the Tabl1F as well ?

From Mainf, click KeyField1 which is a field that belongs to Tabl2F but see the forms in the below structure ?

Tabl1F
- Tabl2F *
-- Table3F
 
you need to setup your form so that Tabl1F, Tabl2F and Tabl3F are SubForms of MainF.
you can then setup to each subform Link Master/Child Fields so that
each subform will only show "related" records.
 
Hi arnelgp unless i haven't understood well your method, the MainF form contains very few basic fields
from Tabl1,2,3 in a continues form, one line each. You can view 40 records or more on the screen, by scrolling
you can inspect, very fast, 200~500 records a day.
The purpose this form is to help user, overview very fast 500 records or so as a directory, spot over there the
emergencies and the "to do" list, click the "GO TO" button and go to full data view of all three forms and carry on, do the job.
So far, we click the button but we see only the - Tabl2F and -- Table3F. We don't see details from Tabl1F.

If I mix all four forms in one link, then, i won't be able to see the "to do" list as a directory any more i am afraid.
 

Users who are viewing this thread

Back
Top Bottom