Calculation Problem

  • Thread starter Thread starter zagazoo
  • Start date Start date
Z

zagazoo

Guest
Hi :)

I'm having trouble!

I have a main report (customers) and two sub reports (service and parts). The sub reports are based on queries and i need to get a total for each one. Then i want to add the service total and the price total together on the main form.

Hope somebody can understand that :). Any help would be greatful.
 
OK what you need to do in each of your subform in the footer section create a calculation. Lets use "PartsSubTotal" as the text box name.

In here it should read something like "=Sum([Price])"

Do this for both subforms, and remember the names you have called the text boxes.

In your main form you would then need another text box pointing at the two text boxes in the subforms.

To do this you would need a text box saying "=[Name of Subform].[Form]![PartsSubTotal]" - this would be the parts subform for example.

To add the two value together, just add the 2 text boxes in your main form.

I hope this helps. If you need any more assistance then let me know.
 
You only need one textbox on the main report, however to account for possible null values in either of the subReports you should use the HasData method.
Examples have been posted here
 

Users who are viewing this thread

Back
Top Bottom