Need to format a number in a report, but no number options come up

B

Beverly76

I have a field on a report which came from an if/then statement, where the
value would either be numerical through addition, or if null, "0" would
replace the null value. So the column contains entirely numbers and zeros.
In my report, I want to format the number, to "standard" for easier reading,
but none of the number choices are displayed.

Does anyone know why this is, and how to get around it?
 
F

fredg

I have a field on a report which came from an if/then statement, where the
value would either be numerical through addition, or if null, "0" would
replace the null value. So the column contains entirely numbers and zeros.
In my report, I want to format the number, to "standard" for easier reading,
but none of the number choices are displayed.

Does anyone know why this is, and how to get around it?

You don't need to use just the ones MS gives you.
The Standard number format is 1,234.56
Just write:

#,##0.00;-#,##0.00;0.00

on the format property line.
The above will display 0.00 if the value is 0. If you just want the 0,
replace the ;0.00 with ;0.

Look up
Format property + Number and Currency datatype
to see why this works.
 
D

Duane Hookom

Your if/then statement probably evaluates as variant text. Try wrap the
statement in Val( ... ) so Access treats it like a number.
 

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