janice12345
asked on
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:
=Sum([Forms]![order.value] )
But it produces and error.
Can you please let me know what I am doing wrong?
Thank you.
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:
=Sum([Forms]![order.value]
But it produces and error.
Can you please let me know what I am doing wrong?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Andrew, got it working. Thank you.
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.