Getting Sum in the Form Footer (1 Viewer)

mahmudich

Registered User.
Local time
Tomorrow, 03:00
Joined
Feb 10, 2003
Messages
73
Hi guys!

I have a continuous Form, which displays a few columns of numbers. All I’m trying to get is the sum of each column in the Form Footer.
For example one of the columns Named: [Sold] and bound to [Sold] field of a table.
So in the Form Footer I created control with Control Source: = Sum([Sold])
No matter what I do I get #ERROR message in the control.

I’ve done it before many times and right now it’s killing me because I’ve tried everything, except probably something bloody obvious.

Thanks you.
 
2 things
  • Make sure that the form controls have a different name to the field names
  • Make sure that you are summing values supplied by the query and not calculated controls on the form
 
Thank you

Fizzio said:
2 things
  • Make sure that the form controls have a different name to the field names
  • Make sure that you are summing values supplied by the query and not calculated controls on the form

Hi Fizzio!
You’re champion! I’ve never noticed that the control’s name suppose to be called different from the field name it’s bounded to. Why is that?

Cheers.
 
It doesn't really matter until you try to do what you are doing. Access then gets confused and throws all it's toys out the pram.

In general, it is better to rename your controls with a prefix eg
cbo for combo
txt for text
chk for checkbox
cmd for command buttons.

It is called Leszynski Naming Convention. Here is a link to a brief summary. http://www.acc-technology.com/namconv.htm and the Microsoft Article on the same topic
 
Last edited:
What's going on?

Hi Fizzio,

I can’t believe what my Access 2000 is doing with me. Once I thought I’d fixed the problem and the next second it comes back again.
I renamed my text box to txtSold and the field where the text box gets its data from called [Sold]. So, to get total of the txtSold text box I type =Sum([Sold]) in Control Source of the txtTotalSold text box in the Form Footer. It’s funny, because sometimes it works and if I just close the Form and open again it doesn’t.

Any ideas? Thank you again.
 
Ok… Sounds like I panicked too early. The awful thing about this sort of bugs is if, for example, I have 5 fields in the Form Footer, where all of them represent totals of its columns respectively and one of them contains a bug, than all 5 of them would show the #ERROR message, not just the faulty one!

Take care.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom