cannot format number in access report

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

Guest

I have been successful many times formating a number in access by using the
properties button in design report. I have a calculated (division) number
field that will not format to zero ddecimals. I want to format it in the
report not the query.
 
try changing the control in the report to an unbound, calculated control by
setting the ControlSource property to

=Format([NameOfField], "0")

suggest you read up on the Format() function in Access Help so you'll
understand how it works.

hth
 
sierralightfoot said:
I have been successful many times formating a number in access by using the
properties button in design report. I have a calculated (division) number
field that will not format to zero ddecimals. I want to format it in the
report not the query.


If you are using a text box's control source expression to
calculate the value, it can be a string. For example
="Cost " & [amount]
is no longer a number so the format/decimalplaces properties
can not affect how the value is displayed.

The way to format the numeric part in that kind of
expression is to use the Format function:
="Cost " & Format([amount], "$#,##0")
 
Actually I found out that the expression was an iif that returned a
text("NA"). When I replace the result with null I was then able to format
throught the properties button in design reports

Marshall Barton said:
sierralightfoot said:
I have been successful many times formating a number in access by using the
properties button in design report. I have a calculated (division) number
field that will not format to zero ddecimals. I want to format it in the
report not the query.


If you are using a text box's control source expression to
calculate the value, it can be a string. For example
="Cost " & [amount]
is no longer a number so the format/decimalplaces properties
can not affect how the value is displayed.

The way to format the numeric part in that kind of
expression is to use the Format function:
="Cost " & Format([amount], "$#,##0")
 
Back
Top