We help IT Professionals succeed at work.

Why doesn't the Form Footer on a form give me a Grand Total?

ES-Components
on
48 Views
Last Modified: 2018-10-11
My Grand Total in the form footer does not work. I get a #Error message.
I used a Query Make Table to create the table I am using is as the Control Source on my form. Table sample is below:

Writer    SumofSales        Expr1    
Tom        100                      100
Harry      250                      250

The form detail section displays the Writer and the SumofSales

In the form footer i used the text box with a name = Text35,
My expression is =SUM([Expr1])

Why doesn't it work?

Thanks...
Rick
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Assuming Expr1 is the name of a control, that is the problem.  You need to refer to bound fields from the recordsource rather than control names.

If Expr1 contains a calculation, then simply repeat the calculation
So if Expr1 is:
=fld1 * fld2
Then
=Sum(fld1 * fld2)
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2013

Commented:
<<I used a Query Make Table to create the table I am using is as the Control Source on my form. >>

If the recordsource of your form is the table created by your MakeTable query, and the table contains a field named "Expr1", then your syntax is ok overall.  However, ensure that the field Expr1 in your table is numeric, not text.  Alternatively, try this:

=SUM(Val(NZ[Expr1],0))

Author

Commented:
QueryTable
Look at the Query I used, (file1392748) and the table, (file 1392749)

I tried both of your suggestions, Still not working. It almost feels too simple to do, but I can not figure out why I
get #Error    for an error message.
 
I currently have the text box in the form footer and get the above error message.

Any other suggestions?

Thank you for any help you can offer!!!
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions