cannot format number in access report

S

sierralightfoot

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

tina

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
 
M

Marshall Barton

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")
 
S

sierralightfoot

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")
 

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