Getting Totals from a Subform

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

I have a form with data refering to a persons holiday entitlement. In the
middle of the form I have a subform that holds dates for each holiday and
the number of days used for that break. The subform is displayed as a
datasheet.

How can I have a running total of days used on the main form?
 
Hi,



You can use a DSum with the same criteria that you used for the subform,
plus a condition on the date_time_stamp field. I assume your fields and
controls are product and receivedDate (as datetimestamp), ad you sum the
quantity up to the actual received date:


=DSum("qty", "tableName", "product=FORMS!FormName!Product AND ReceivedDate
<= FORMS!FormName!ReceivedDate" )



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top