473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Correctly sum a column of currency in a report -- rounding issues???

I have a report showing Rate, Hours and Total Pay (which is
Rate*Hours) for several workers. I want to sum the Total Pay and get
a CORRECT figure. This seems like it should be such a simple task.
But there seems to be rounding issues in Access 2000 that I can't
figure out. It seems that, even though the report is displaying Total
Pay as currency rounded off to two decimal places, the report is
actually using more than two decimal places in the summing
calculation. Can anyone help me? Thanks.
Nov 13 '05 #1
2 5094
If you have not already done so, create a query to act as the RecordSource
for your report.

In the query, enter a calculated field that rounds each line to the nearest
cent. Then the total will have no rounding issues.

Type something like this into the Field row in query design:
TotalPay: CCur(Nz(Round([Rate] * [Hours], 2)))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Lynn N." <lu*******@aol.com> wrote in message
news:48**************************@posting.google.c om...
I have a report showing Rate, Hours and Total Pay (which is
Rate*Hours) for several workers. I want to sum the Total Pay and get
a CORRECT figure. This seems like it should be such a simple task.
But there seems to be rounding issues in Access 2000 that I can't
figure out. It seems that, even though the report is displaying Total
Pay as currency rounded off to two decimal places, the report is
actually using more than two decimal places in the summing
calculation. Can anyone help me? Thanks.

Nov 13 '05 #2
Allen, your solution didn't work for me for some reason. But I found
a function at http://www.woodyswatch.com/access/archtemplate.asp?3-22
that worked quite well. There's an article in there all about
rounding in Access.

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<40**********************@per-qv1-newsreader-01.iinet.net.au>...
If you have not already done so, create a query to act as the RecordSource
for your report.

In the query, enter a calculated field that rounds each line to the nearest
cent. Then the total will have no rounding issues.

Type something like this into the Field row in query design:
TotalPay: CCur(Nz(Round([Rate] * [Hours], 2)))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Lynn N." <lu*******@aol.com> wrote in message
news:48**************************@posting.google.c om...
I have a report showing Rate, Hours and Total Pay (which is
Rate*Hours) for several workers. I want to sum the Total Pay and get
a CORRECT figure. This seems like it should be such a simple task.
But there seems to be rounding issues in Access 2000 that I can't
figure out. It seems that, even though the report is displaying Total
Pay as currency rounded off to two decimal places, the report is
actually using more than two decimal places in the summing
calculation. Can anyone help me? Thanks.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mal | last post by:
Hello.. Is there a property to force a new column in a report. I've looked at moveLayout, newRecord...and am thinking that some combination of those might do it...but how??? I want to test...
3
by: daveS | last post by:
I have come accross the exact same problem as below. The address that was given as a solution cannot be found. Specifically, i need to be able to show labels in only the first column of a report!...
5
by: hasanainf | last post by:
Hi, Need help on this report My report displays as follows Receipt Number Checkout Date Payment Date 13580 30-06-2005 02-07-2005 13581 01-07-2005 02-07-2005
5
by: Cygnus | last post by:
Sorry in advance for the lack of formatting in this posting. Data: (column headers) Net Sales | Royalty Rate | Total Royalty (data) 4.31 | 50.00% | 2.15 19.35 | 50.00% | 9.68
2
by: Jimmy | last post by:
On the subreport, records are grouped by WorkDate. In the WorkDate header there is a textbox named DateCounter with the control source =1 and running sum set to yes. In either the report footer or...
2
by: apartain | last post by:
In the detail of my report I am extracting a sum from a hidden subform via the following: =IIf(.Report.HasData=True,.Report!Text19,0) Where Text19 is the sum of the items in the subform. I...
3
by: mickeybaez | last post by:
Need Help! I am new to asp.net and I am having problems inserting proper data into SQL Server 2000. I have a field named salary with the datatype of decimal. When I insert a value into the...
3
by: voroojak | last post by:
I have a problem with report service. i have a stored procedure and when i am running it in the sql 2005, it will exexute successful and no proplem. but when i a mputting it in my report service as...
0
by: =?Utf-8?B?S2F0aHk=?= | last post by:
I wold like to roundup fields in my report. They are not calculated fields but are numeric. I have =Round(,0) This gives me an error I have tried =-Int(-2*()) I receive an error when the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.