calulated field from subform

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I have what I think is a pretty standard billing form. It comprises a main
invoice form linked to an invoice details form for line items. Each line
item ends in a total field which is itself a caculation of [Payrate]*[Units].

I need to create a calcuated field that adds the line items from the
subform on the fly and displays them in another field, preferably in the
main form. The calcuated data won't be saved but my users find it
helpful to use the grand total as a visual clue to help them catch their
data entry errors.

thanks,

rOn
 
Ron,

The easiest way is to use a textbox in the footer of the
subform with "=Sum([YourFieldToSum])" as the control source.
To have one on the mainform you would most likely end up
using DSum() to query the underlying records for that
InvoiceID.

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
I have what I think is a pretty standard billing form. It
comprises a main
invoice form linked to an invoice details form for line
items. Each line
item ends in a total field which is itself a caculation of
[Payrate]*[Units].

I need to create a calcuated field that adds the line items
from the
subform on the fly and displays them in another field,
preferably in the
main form. The calcuated data won't be saved but my users
find it
helpful to use the grand total as a visual clue to help them
catch their
data entry errors.

thanks,

rOn
 
Thanks, Gary. That did the trick. The only problem is that
my sum field in the footer doesn't show up unless my
subform is in form view. I'd like the subform in dataview
but the sum field to show in the footer. Possible?
 
Back
Top