How to creating an updating total on my form...

matorme

Registered User.
Local time
Today, 22:55
Joined
Apr 11, 2008
Messages
17
I currently have a sandwhich shop form (a-level work). on this form i have a subform which is the orderline, ie its where the clerk enters the sandwhich's and qty for the order. Each product has a unitcost within its base table.
im having trouble on how to add up all the subtotals shown in the subform and then present them on the main form (so clerk can read back to customer).

i wud love this to be a running total, so it updates as more items are added to the orderline but if its easier to just have a button that i click and then the total is calculated and shown that would be great.

Any help will be great, been trying to get this for 3 days now! lol

Thanks,
Mat :)
 
Put an invisible TextBox in the Footer of the SubForm with a ControlSource of =Sum([YourSubTotalControl]). You can then add a control to your MainForm that points to the Totaling control in the SubForm.
 
thanks for you quick reply RuralGuy. That sounds, logically, that it should work. I'll go try it out and hopefully end my troubles lol..
..sorry but im unsure what you mean by 'YourSubTotalControl' not sure how to add controls?
thanks for your replies...
 
Last edited:
yeah so the field i what to tally up into a grand total is called SubTotal. ther are a number of these as this is the item cost * the qty.
so in the footer, in the text box i now have a textbox =SUM([SubTotal]).
how do i then have a textbox on my main form that 'points' to this?
 
thankyou for that link georgedwilkinson!!! got it working now, glad im over that hurdle. i now have the order total tallying up on the main form as i enter new items in the subform.
Thanks for all the help ppl :)
 
Excellent! Thanks for posting back with your success.
 
But it might be advisable to spell 'sandwich' correctly.
 
But it might be advisable to spell 'sandwich' correctly.
But the incorrect spelling reminded me of the old joke

Q. Why will you never be hungry in the desert
A. because of the Sand which is there

Boom Boom:D
 
Pedantic, but I can't help it.

And that joke wouldn't work if you didn't accept the ungrammatical use of 'which' instead of 'that'.
 

Users who are viewing this thread

Back
Top Bottom