Calculate Totals in form from subquery

J

JB

Hi there,

I am really not able to do this. Please help.

We have a form with a subquery.
The subquery filters details after entering the beginningDate and endingDate in the form's controls (using 'between' in criteria field of DateID).
We would like to calculate totals of linetotal field of the subquery.
The totals text box which is to be calculated is in the main form.

Please not that it is really a subquery and not a subform.

TIA.
JB.
 
W

William Taylor

use the dSum function to populate the field value. use the after update
event of the second date field.
Me!fldTotal = DSum("fieldToCalculate","[QueryNameIn subform control]",
"[QueryDateField] Between " & me!field1 & " And " & me!field2)
JB said:
Hi there,

I am really not able to do this. Please help.

We have a form with a subquery.
The subquery filters details after entering the beginningDate and
endingDate in the form's controls (using 'between' in criteria field of
DateID).
 

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