I thought I COULD sum fields from my data source?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My data source for my report involves calculated fields in a query with
expressions such as: INS FEE: FormatCurrency(IIf([DATEPAID]=[Preliminary
Report Query]!DATEPAID,[Preliminary Report Query 2]![INSURANCE FEE],Null)).
Now all I want to do in my report footer is =Sum([INS FEE]).

Why does it say the expression is too complex to be evaluated?
 
Don't format values in your query. Formats should be applied in your control
sources on your forms and reports.
INS FEE: Val(IIf([DATEPAID]=[Preliminary Report Query]!DATEPAID,[Preliminary
Report Query 2]![INSURANCE FEE],0))
 
CSOUSA said:
My data source for my report involves calculated fields in a query with
expressions such as: INS FEE: FormatCurrency(IIf([DATEPAID]=[Preliminary
Report Query]!DATEPAID,[Preliminary Report Query 2]![INSURANCE FEE],Null)).
Now all I want to do in my report footer is =Sum([INS FEE]).

Why does it say the expression is too complex to be evaluated?


Possibly something wrong with the use of DATEPAID??

Also, when you format a value, the result is a text string,
which can not be summed. Get rid of the FormatCurrency
function.
 
Excellent suggestions from you both. I didn't realize that the
"FormatCurrency" function resulted in a text string. Someone had mentioned
before how once I got it to work I could drop the function and still have the
data appear with the correct amount of decimal places-- also a great
suggestion.

So I dropped the FormatCurrency function from the expression, used the field
properties in the report itself to display the information as currency, and
performed the Sum again (also formatted to currency).

Looks beautiful.

Marshall Barton said:
CSOUSA said:
My data source for my report involves calculated fields in a query with
expressions such as: INS FEE: FormatCurrency(IIf([DATEPAID]=[Preliminary
Report Query]!DATEPAID,[Preliminary Report Query 2]![INSURANCE FEE],Null)).
Now all I want to do in my report footer is =Sum([INS FEE]).

Why does it say the expression is too complex to be evaluated?


Possibly something wrong with the use of DATEPAID??

Also, when you format a value, the result is a text string,
which can not be summed. Get rid of the FormatCurrency
function.
 
Back
Top