Report - text box expression

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.
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top