Grand total form/subform problem.

Lakhvir

Registered User.
Local time
Today, 07:07
Joined
Mar 9, 2012
Messages
46
Hi,

I have a booking form with a subform. I have included a sum calculation in the footer of the subform however it is not displaying :s

The calculation is used to sum up all of the total costs to make the grand total for the one booking. Why is it not working, when the syntax is actually correct?

Many thanks.
 
Hi Lahkvir,
Is your form or sub-form that has the total based on a query where the actual math takes place? That's the usual method of putting math onto a form.

Hope that helps.
 
Hi Lahkvir,
Is your form or sub-form that has the total based on a query where the actual math takes place? That's the usual method of putting math onto a form.

Hope that helps.

Thank you for replying.

In the subform the fields NoOfHours*Rate gives the total cost. In the database totalcost is a calculated field. What I'm trying to do is do a grand total. The calculation is working, but it doesn't show up. I've placed the grand total calculation in the footer of the subform.
 
In the subform the fields NoOfHours*Rate gives the total cost
Hi again, Lahkvir,

Maybe I haven't understood the problem you were trying to explain. My confusion starts with "NoOfHours*Rate" is a field in your subform. I'm assuming (maybe the wrong thing to do) you have a field in a table and the field is "NoOfHours" and somewhere you also have a field in a table called "Rate." You want to display the total cost ("NoOfHours" * "Rate") in a subform. and then you want to give a grand total in the footer of the subform. What have you called the field where you are doing the math? In your footer, you need to "Sum" the "Name of the math field in the subform".

I hope that helps.
 
Hii. I have attached a print screen for you so you can visualize the problem I am having. I'm not good at explaining haha :L

http://i41.tinypic.com/15qb05u.png

I don't know what is causing it. I could really do with some assistance! Many thanks.
 
Thank you for the snapshot of the form. That helps me a lot. The Grand Total as it is placed can't do the math you want. You'd need it to be at the bottom of the "Total Cost" column, but that won't happen where it's situated now at the end of each row of data. In the subform's page footer, place an unbound textbox below your Total Cost column and sum the total cost there. The formula should be as simple as
"=Sum(totalcostfieldname)"

Hope that helps.
 
Thank you for the snapshot of the form. That helps me a lot. The Grand Total as it is placed can't do the math you want. You'd need it to be at the bottom of the "Total Cost" column, but that won't happen where it's situated now at the end of each row of data. In the subform's page footer, place an unbound textbox below your Total Cost column and sum the total cost there. The formula should be as simple as
"=Sum(totalcostfieldname)"

Hope that helps.

Hi, thank you for replying.

I have done it the way you suggested in the picture shown. But for some reason it keeps showing up the way it does in the picture :confused:
 
Howzit

It looks like you have the grand total in the detail section of your subform not the footer or header section as Mimadocken said. As your subform is a datasheet the grandtotal will not be visible when you place it in the header/footer section. This is OK, as you will have a control on your majnform that will reference your subform grandtotal.
something like
Code:
=yoursubformctrl.form!yourgrandtotalcontrol_on_subform
Remember if you have spaces in control or field names to surround them in []
 
Thank you Kiwiman for spotting the datasheet problem. I came back because it had finally (DUH!!) occurred to me that a datasheet is what I was seeing here. Hopefully by now, things are working much better.
 
Howzit

It looks like you have the grand total in the detail section of your subform not the footer or header section as Mimadocken said. As your subform is a datasheet the grandtotal will not be visible when you place it in the header/footer section. This is OK, as you will have a control on your majnform that will reference your subform grandtotal.
something like
Code:
=yoursubformctrl.form!yourgrandtotalcontrol_on_subform
Remember if you have spaces in control or field names to surround them in []


Hii,

What do you mean by a control on the mainform? A textbox? So there is no way to get the grand total in the subform?

Thanks.
 
The biggest problem you are having with trying to see the grand total on your subform is caused by having the subform in datasheet view, rather than as continuous forms. Datasheet view is cancelling your ability to use the footer where you put your Grand Total text box.

Try changing that in your Properties, and it may help you move forward.
 

Users who are viewing this thread

Back
Top Bottom