Display subform total on main form

G

Guest

I have a form with a subform.
I would like to have the sum of a field from the subform on the form.

I was thinking of:
DSum("[Quantity]";"sales")

The problem is that is giving me the total quantity (from all records) in
the table.

What I need is the sum of the values showed on the subform.

Is this possible
 
G

Guest

Hi Raul

Create a new text box in the "subforms" footer and use this as a calculated
control to give your the figure you want (set to Visible = No if you don't
want to see it). I have called it SubFormTotal

Create a new text box on your "main form" and use this is as the Control
Source

=[SubformName].[Form]![SubFormTotal]

Hope this helps
 

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