Form calculations from a subform

K

Ken

Hi All
I have a form that has a subform in it. The form is set to show a single
form in the properties, so that it can have a subform in it.
The subform adds a set of numeric results at the bottom of it.
I have managed to get the form to capture these results and display them in
the form while the subform is still displayed.
I need to be able to set the form properties as continous forms and display
the results
from the subform.but cannot set it to continous because it contains a
subform.
Is there any way I can set the properties as continous forms then open the
form so that it can grab the results from the
subform which will be closed?
Cheers
Ken
 
T

tina

you can't use a subform in a main form that's set to Continuous Forms.

but...in your original Single Form view, presumably your subform does some
math calculations in a control in its' Footer section. so what it's doing is
using a subset of table data that is linked to the current record on the
main form.

you should be able to duplicate the calculations using one or more domain
aggregate functions (DSum(), DCount(), etc) which specify criteria that
pulls the same subset of records you were working with in the subform. on
the main form set to Continuous Forms view, add an unbound control and set
its' ControlSource property to the expression that does the calculations.

the above is pretty general, because you didn't include specifics in your
post. if you need more specific details, post back with table and field
names of the main table and related table, and the specific math
calculation.

hth
 
K

Ken

tina said:
you can't use a subform in a main form that's set to Continuous Forms.

but...in your original Single Form view, presumably your subform does
some
math calculations in a control in its' Footer section. so what it's doing
is
using a subset of table data that is linked to the current record on the
main form.

The subform is set to contious forms and calculates 1 field in its footer.
Field Name =Sum([G_Tot])
I have put a field into the main form as =[SF-VisitDates].Form!G_Total
which grabs and displays the calculated data.
I needed to be able to recreate the form without the subform and for it to
still grab the information.
if it could, then I could set the form to continous forms.. Would the
information below be able to do that.
Thanks in advance
Ken
 

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