Totals in SubForm Footer do not display corectly on Main Contiuous form

S

Sierras

Hi

I have a main form which is a continuous form.
The Subform is also continuous where you input expenses related to the
main form record. There is a calculated field in the subform footer which
adds the expenses. Then I put another field in the main that displays
this field.
All is fine for the record the user is presently clicked on, but the rest
of the records displayed in the main continuous form have erroneous data.
I've tried refresh, recal, requery with on load and on open events for the
main form with no luck.

How can I get the continous main form to show the correct calculated data
from the subform footer?

Thanks
 
K

kingston via AccessMonster.com

What is the formula you used in the control of the main form? If you
reference the subform in the formula, it will draw data from only the current
subform. You have to calculate the value based on the main form (e.g. DSum
(Value,Table,ID=MainFormID)). Also, it sounds like you want the total to
show up in the subform and the main form with the exact same number.
 
S

Sierras

Well the DSum seems to work better when you are opening the form. But the
values don't refresh themselves unless you close the form and re-open it..
Plus, it gives you an #error in the new record field.

And yes - the total values on the subform footer will be the same as that
on the main form. But the footer values are hidden. I'm just using it
for a holding place for the calculation.
Similar to NorthWind's example of the orders. But they are using a single
main form. If I do that as well, then all is fine.

But I have a main form which is a continuous form. And I placed another
continuous subform in the main form's footer. That's the only way I could
get both main and subform to be continuous forms.

So now I have to figure out where to put refresh or requery commands to
keep the data accurate without killing the performance. Either that or go
to a single form and use the Northwind method.

Any other ideas would be appreciated...
 
K

kingston via AccessMonster.com

Yes, this doesn't work with continuous forms; I should have mentioned that
before. You can build a query that calculates this value and make the form
based on this query in addition to the existing dataset. However, you may
lose edit capability. I think your best bet is to expose the subform footer
or go to the single record method.
Well the DSum seems to work better when you are opening the form. But the
values don't refresh themselves unless you close the form and re-open it.
Plus, it gives you an #error in the new record field.

And yes - the total values on the subform footer will be the same as that
on the main form. But the footer values are hidden. I'm just using it
for a holding place for the calculation.
Similar to NorthWind's example of the orders. But they are using a single
main form. If I do that as well, then all is fine.

But I have a main form which is a continuous form. And I placed another
continuous subform in the main form's footer. That's the only way I could
get both main and subform to be continuous forms.

So now I have to figure out where to put refresh or requery commands to
keep the data accurate without killing the performance. Either that or go
to a single form and use the Northwind method.

Any other ideas would be appreciated...
What is the formula you used in the control of the main form? If you
reference the subform in the formula, it will draw data from only the
[quoted text clipped - 25 lines]
 

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