Main form and subforms (1 Viewer)

Y

Yvonne

Guest
I have a main form with two nested subforms in it, but only the lowest-level form can appear in continue form view. I very want the intermediate form to appear in continue form view too. Are there any method for doing this? Thanks!
 

Bru

Registered User.
Local time
Today, 18:26
Joined
Nov 12, 1999
Messages
18
The best way to predict the outcome of a sub form is to create it ahead of time as though it were a stand alone. When you do this, you can set the Navigation buttons and Views allowed to what you want before you nest them.

Another, and more elegant way to nest forms is not to nest them in eachother but side by side. You have your main form, then a sub form then another sub form below that linked to the first sub form. There are different ways to do this but the easiest I have found is to create queries for each sub form where the criteria is dependent on the current record of the form ahead of it (parent, if you like).
Make sure you add the fields you are going to relate, even if the user isnt supposed to see them (turn them to Visible=no.)
In the expression builder in the data tab of properties, link the required field of the parent sub form to [Childsubform].Form![Linkedfield]. You may also have to add this into the QBE grid in the sql statement linking the forms.
The Orders form in Northwind shows this technique quite well..

Be sure to requery the subforms for new records selected ahead of them, or they won't be updated.
Bru
 

Users who are viewing this thread

Top Bottom