Calculate Totals in form from subquery

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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).
 
Back
Top