Subform Total with over 15 rows

treva26

Registered User.
Local time
Today, 11:48
Joined
Sep 19, 2007
Messages
113
I have a strange problem.

I have a subform which calculates 2 totals in its footer.
I have a button on my main form which puts those totals into boxes on my main form.

Everything works fine, unless I have over 15 rows in the subform!

The button first does a requery on the subform
I think this is the problem, I guess it takes too long
But if I dont Requery it often gives the old value

How can I force everything to wait until the requery is finished?
Or is there another way, or something I am missing...
 
i think I had a similar problem and gave up

i couldnt find a way of getting the value from the subform, as the main form seemed to have read the value before it was calculated, if you know what i mean,
 
Make a query that gives the Sum for the selected records in the query supporting the subform.

Open a form based on the Sum query and then set the value of the field in the main form from the value in the form based on the Sum query...then close that form.

I think that will allow things to move along in the right order
 
Yep:) but principle is similar in that the total to be inserted from the subform is coming from a query result and not a textbox calculation.
Yes, I agree with that. It's just easier to use DSum() that fiddle about with a query that isn't the one the form is bound to.
 
Awesome thanks guys, I'm using DSum() and it works perfectly.
 

Users who are viewing this thread

Back
Top Bottom