Getting Totals from a Subform

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?
 
M

Michel Walsh

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
 

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