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

  • Thread starter Thread starter Beverly76
  • Start date Start date
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?
 
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.
 
Your if/then statement probably evaluates as variant text. Try wrap the
statement in Val( ... ) so Access treats it like a number.
 
Back
Top