Subforms

  • Thread starter Thread starter Squid
  • Start date Start date
S

Squid

I have a simple Main Form with a subform. The Main Form
displays project information. The subform details the men
working on that project and the hours they worked. I want
to display a total hours worked on the form per project.

How do I sum the hours being displayed on the subform and
display it on the main form?

Thanks
Mike
 
See:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html

The article explains how to create a calculated field in a query to get the
number of minutes worked. You can then place a text box in the Form Footer
section of your subform, and give it these properties:
Name txtTotalMinutes
Format General Number
Control Source =Sum([Minutes])

Then on your main form, you can pick up this value by setting the Control
Source of a text box to:
=[NameOfYourSubFormControlHere].[Form]![txtTotalMinutes

The article explains how to display that as hours and minutes if desired.
 
Back
Top