• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

MS Access 2003 - Forms - SUM function

Hello Experts,
I have a form in Access named customer.  This form displays customer details with the fields:
cust_id, name, address, phone

This form also has a related subform named order. The subform contains a list of transactions related to the current customer on the parent form. The fields are:

cust_id, ord_id, description, value

I want the parent form named customer to display the total value of all transactions in the subform. Ive tried to do this using a text box on the parent form with the following:


But it produces and error.

Can you please let me know what I am doing wrong?

Thank you.
1 Solution
In the SubForm put in a textbax called txtSUM with a controlsource of =SUM(Value) then in the main form put in a textbox called txtSubFormTotal with a control source of =Forms!Customer!Order.Form!txtSUM

I am assuming the Sub Form Control Name is Order but you may wish to check this as it may be different from the name of the subform.

Cheers, Andrew
Look at the Orders form in Northwind and you'll see how this is done.
You need to create the subform total in the subform and then set the control source of an unbound textbox on the main form to the Total on the subform.

janice12345Author Commented:
Andrew, got it working. Thank you.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now