Subtotal in Subform

wort0987654321

Registered User.
Local time
Today, 22:49
Joined
Dec 5, 2002
Messages
90
another bloomin problem

i have a form that is a sub form.

the subform allows the user to add extra items to a booking. i want to be able to make a subtotal of the extra items that have been booked for each seperate booking ID. can someone please help me, but please make the instructions fairly easy to understand.

thank you
 
i have added a text box to the form footer but am unsure on what sum i need to perform as there could be upwards of 4 different fields that need to be added toghether
 
The control source of your text box in the footer should resemble

=Sum([Field1Name]+[Field2Name]+[Field3Name]+[Field4Name])

HTH
Dave
 
i only need to add two fields together, the price of the extra and the quantity. but customers may wish to have more than one extra so i may need to add toghether 3 or 4 records not fields
 
Make sure that your controls on your form are not named the same as the fields you are trying to calculate a sum for.

If they are named the same, it will generate an error when you put the formula in as the control source of the control in your footer.

If you created the form by using the form wizard the controls will be named the same as the fields (just like Microsoft to do something stupid like that). If so, then you need to change the text boxes on your sub form to something like txtMyField from MyField.
 
Sum problem continues

Hi,

I read this topic and I have the same problem.

I have a subform too (see attachment). Each row is a new record. I want to sum the column 'Gewicht' and the column 'Aantal' seperated from each other.

After that I want to devide the total sum 'Gewicht' by total sum 'Aantal'... and show it in the mainform.

I added a textbox in the footer of the subform to try this out, but without any results.

I added the following line in the control source of the text box:

=Som([txtGewicht]+[txtAantal])

When I am using the form I get an error in the text box.

Question:
What's the solution for this problem?!?


Please help... :confused:
 

Attachments

  • sumproblem.jpg
    sumproblem.jpg
    26.9 KB · Views: 192
You would be better startin a new thread, but it would appear that it should be =Sum([Gewicht]+[Aantal])
 
Problem solved!

Back again!

My problem is solved... now my New Year Party can finally start!


See you next year... ;)
 

Users who are viewing this thread

Back
Top Bottom