Report - text box expression

  • Thread starter Thread starter sphaynes
  • Start date Start date
S

sphaynes

I have the following expression in 6 text boxes of a report:

="$ " & Sum([FieldName]) & " (" & Count([FieldName]) & ")"

If the sum of the field information is zero, three of the text boxes
display $ (0) when I run the report. The other three correctly show $
0 (0)

What is causing this?

Also, if the sum of a field is a whole number, .00 is not added, though
it's a currency field in the table. What can I do to fix this.

Thank you for the assistance.
 
to fix the "blank" problem, try

="$ " & Nz(Sum([FieldName]), 0) & " (" & Count([FieldName]) & ")"

the above all goes on one line, of course. to fix the formatting problem,
try

=Format(Nz(Sum([FieldName]), 0), "Currency") & " (" & Count([FieldName]) &
")"

the above all goes on one line, of course.

hth
 
Back
Top