Nested subforms on a single form

D

dch3

I have a form with multiple subforms that I need to daisy-chain in terms of
the linking...for lack of a better description. Figuratively it will look
like this...

Parent form >> child form >> grandchild form

Conceptually, the parent form is selecting a PATIENT which causes the child
form to dipslay OFFICE VISITS. When an OFFICE VISIT is selected, the
grandchild form displays VISIT DETAILS.

OFFICE VISITS is a continous record form.

So what syntax should I use in the Link Child/Link Master fields?
 
A

Albert D. Kallal

If the visits does not need to be editable at that time, you could use a
list box, and still have a continuous form to display the visit details

Take a look at the following screen shots and you'll get some ideas of the
layout some talking about

http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

Anyway let's take crack at your problem:

I would built 2 grids using continues forms

You then create a form, and drop in the above two forms
(you don't use a sub-sub form, but place them side by side -- The very last
screen shot in the above link shows this classic many to many type display )

In the 1st form (visits???) in the on current event, you
place the following command to make the 2nd sub form follow (visit details)

me.Parent.VistiDetails.Requery

You thus can'should set the link child/master settings for visits subform.

In the link child/master settings for the visit details:

linkChildFields main_id (whatever is the name of the field in
this sub-form that is used to relate back to the parent table visits)
LinkMasterFields [visits.[form].[ID] ("visits is the name of
the control you used to hold the visits form).

The above may not be 100% correct, but it's a pretty good guess as to how
this can work...
 
D

dch3

Nope. It all has to be edible. I was playing last night with using a WHERE
statement in the grandchild's RS tied back to the current record in the CHILD
subform and then requery on CURRENT.
 
D

dch3

Tasty and good looking. Its all about presentation. The $35 steak is only $35
because of the placement & design of the food on the plate.

I ended up placing the grandchild subform in the child subform's footer,
this allowed the child subform to be set to Continuous records while the
grandchild form only shows the records related to the current record.
 
J

John W. Vinson

I ended up placing the grandchild subform in the child subform's footer,
this allowed the child subform to be set to Continuous records while the
grandchild form only shows the records related to the current record.

Hrm. That IS tasty... and I haven't ever done that!

Thanks for posting back.
 

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