Problem formatting data in text fields in Access Report

G

Guest

Hi,

I'm working on making a custom report in Access and am having trouble
formatting some numbers that are in text fields. The report was started with
the report creating wizard and modified to meet customer requirements.
Access used text fields to sum a few of the fields (i.e. Jan 07), but it
won't let me decrease the decimals (the data looks like 155.5, but it should
say 156). If you go into properties for the text field and go to the format
tab, then select 0 decimal places, decimals still show up. What could be
wrong? Thanks,

Dave
 
M

Marshall Barton

DaveA said:
I'm working on making a custom report in Access and am having trouble
formatting some numbers that are in text fields. The report was started with
the report creating wizard and modified to meet customer requirements.
Access used text fields to sum a few of the fields (i.e. Jan 07), but it
won't let me decrease the decimals (the data looks like 155.5, but it should
say 156). If you go into properties for the text field and go to the format
tab, then select 0 decimal places, decimals still show up.


What, exactly do you have in the text box's ControlSource?

What you are describing sounds like something else is
formatting the number. This might be done by using the
Format function in the control source expression or maybe
the query converted the number to type Text.
 
G

Guest

In the Format property for the textbox try putting just one # and see
if it rounds to whole number.
 
G

Guest

The ControlSource of the text box says "=(Sum([Jan 07]))/133"

How do you use the format function to change this? The report is based on
data that is in an existing table (it was already run through a query, so the
data is in a table). Not sure if that makes any difference. All of the
month fields (like Jan 07) are of type number in the table. Hope this helps.
Thanks,

Dave
 
M

Marshall Barton

DaveA said:
The ControlSource of the text box says "=(Sum([Jan 07]))/133"

How do you use the format function to change this? The report is based on
data that is in an existing table (it was already run through a query, so the
data is in a table). Not sure if that makes any difference. All of the
month fields (like Jan 07) are of type number in the table. Hope this helps.


=Format(Sum([Jan 07]))/133, "0")

but try Karl's suggestion first.
 

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