URGENT! Access is rounding a sum and I don't want it to

T

Tara

I have a report that calculates hours spent doing certain tasks with clients.
Hours are broken down into 1/4 hour increments and are represented as .25.
..5, .75, and 1. I have a Sum expression in the footer that, based on the
information above, should always end in a whole number (no decimals) or in
..25, .5, or .75. However, it is rounding. For example, .25 becomes .3 I
can't have that. It MUST be completely accurate. How can I prevent it from
happening?

Thanks,

Tara
 
J

Jeff Boyce

Tara

Remember than how data is STORED and how it is DISPLAYED are two separate
matters.

First, how do you know the underlying data is actually being stored as ".25"
instead of ".3"? Check the table definition to see how that field is being
stored.

Once you've confirmed that the data is being properly stored, check the
query that feeds your report and/or the report. Look at this/these in
design view, and confirm that the formatting of that control is correct.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
T

Tara

Thanks for getting back to me Jeff. Yes, the data is being stored correctly.
Actually, I fixed the problem by setting the format of the calculated text
box to Fixed and 2 decimal places. I freaked out when I saw it (I'm pushing
a deadline) and didn't slow down enough to stop and think about it or I would
have realized how to correct it. Thanks for the quick reponse.
 
M

Marshall Barton

Tara said:
I have a report that calculates hours spent doing certain tasks with clients.
Hours are broken down into 1/4 hour increments and are represented as .25.
.5, .75, and 1. I have a Sum expression in the footer that, based on the
information above, should always end in a whole number (no decimals) or in
.25, .5, or .75. However, it is rounding. For example, .25 becomes .3 I
can't have that. It MUST be completely accurate. How can I prevent it from
happening?


Try formatting the text box to display two places.
 

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