Sum function

mikemaki

Registered User.
Local time
Today, 14:33
Joined
Mar 1, 2001
Messages
81
I am developing a db for capital budget requests. I have several pop up forms that I use as requestor woksheets. Most are continuous forms that use the Sum() function in the footer. I have one form, though, that I cannot get to work. It displays #Name? in the totals boxes (I have one for each of three years). My control source statement is:

=Sum([CostPerUnit]*([Forms]![frmMainScreen]![InpatientProcsY2]+[Forms]![frmMainScreen]![OutpatientProcsY2]))

If I remove Sum from the statement I get the correct answer for Cost * Procedures.

I added a test field to my table, query and form to make sure the formulas in the controlsources weren't causing the problem. Its total also came up as #Name?. Does anyone have any ideas as to what's wrong?
 
Just a suggestion:

=Sum([CostPerUnit])*(Sum([Forms]![frmMainScreen]![InpatientProcsY2])+Sum([Forms]![frmMainScreen]![OutpatientProcsY2]))
 

Users who are viewing this thread

Back
Top Bottom