Subtotal a subform

T

TaylorLeigh

I have a Product column, a price column and a Q*P column. I want a running
total of the Q*P column. I put a formula in the footer
Sum=([quantity]*[price]) and I get a #Name? error. What does this mean and
what do I need to change?

Thanks,
 
K

Ken Sheridan

It means that Access doesn't recognize the expression. This is because
you’ve put the = sign in the wrong place. It should be:

=Sum([quantity]*[price])

Ken Sheridan
Stafford, England
 
T

TaylorLeigh

=Sum([Quantity]*[Price]). I have copied this formula so you can see what I
have. I now get a #error.

Ken Sheridan said:
It means that Access doesn't recognize the expression. This is because
you’ve put the = sign in the wrong place. It should be:

=Sum([quantity]*[price])

Ken Sheridan
Stafford, England

TaylorLeigh said:
I have a Product column, a price column and a Q*P column. I want a running
total of the Q*P column. I put a formula in the footer
Sum=([quantity]*[price]) and I get a #Name? error. What does this mean and
what do I need to change?

Thanks,
 
K

Ken Sheridan

If Price and Quantity are fields in the subform's underlying recordset, and
the expression is the ControlSource property of a text box in the subform's
footer (not the parent form's footer) then there should be no problem.

If you want the total in the parent form then you need to hide the control
in the subform, and reference it as the ControlSource property of a control
in the parent form. See the Orders form in the sample Northwind database for
an example. You'll see that the Subtotal text box control references a
control in the subform with:

=[Orders Subform].Form!OrderSubtotal

Note how the subform's control is referenced via the Form property of the
parent form's Orders Subform subform control. Its important to understand
that Orders Subform is a reference to the control in the parent form's
Controls collection which houses the subform, not to the subform's underlying
form object. It just so happens that both have the same name in this case.

Ken Sheridan
Stafford, England

TaylorLeigh said:
=Sum([Quantity]*[Price]). I have copied this formula so you can see what I
have. I now get a #error.

Ken Sheridan said:
It means that Access doesn't recognize the expression. This is because
you’ve put the = sign in the wrong place. It should be:

=Sum([quantity]*[price])

Ken Sheridan
Stafford, England

TaylorLeigh said:
I have a Product column, a price column and a Q*P column. I want a running
total of the Q*P column. I put a formula in the footer
Sum=([quantity]*[price]) and I get a #Name? error. What does this mean and
what do I need to change?

Thanks,
 

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