473,408 Members | 2,839 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,408 software developers and data experts.

Currency Error on decimal

Hi all:

I am working on Access 2000 with SP3. The problem is the sum of currency has
$0.01 difference on the total even I use the same equation on all forms.

I have a product which costs $538.20, then add two taxes (7% ---$37.67 and
6% ---$32.29) and the total amount should be $608.16.

Total=Subtotal (1 + Tax1 +Tax2) all controls are formated as currency.
$608.16 = $538.20 + $37.67 + $32.29

The problem is some forms show $608.16 but other show $608.17.

Any suggestions

Thank you
Jan 31 '07 #1
2 1752
On Wed, 31 Jan 2007 06:24:22 GMT, "labcheung" <la*******@yahoo.com>
wrote:

Put the same calculation in Excel, and change the number of decimals
to many. That will show you why it's working the way it is.
The solution is to round to two decimals before you add, perhaps using
the Round function or some other more specialized rounding function.

-Tom.

>Hi all:

I am working on Access 2000 with SP3. The problem is the sum of currency has
$0.01 difference on the total even I use the same equation on all forms.

I have a product which costs $538.20, then add two taxes (7% ---$37.67 and
6% ---$32.29) and the total amount should be $608.16.

Total=Subtotal (1 + Tax1 +Tax2) all controls are formated as currency.
$608.16 = $538.20 + $37.67 + $32.29

The problem is some forms show $608.16 but other show $608.17.

Any suggestions

Thank you
Jan 31 '07 #2
Lab
Thank you very much, Tom.

I take your advise with "Round" function and everything goes back to normal

Lab
"Tom van Stiphout" <no*************@cox.netwrote in message
news:tj********************************@4ax.com...
On Wed, 31 Jan 2007 06:24:22 GMT, "labcheung" <la*******@yahoo.com>
wrote:

Put the same calculation in Excel, and change the number of decimals
to many. That will show you why it's working the way it is.
The solution is to round to two decimals before you add, perhaps using
the Round function or some other more specialized rounding function.

-Tom.

>>Hi all:

I am working on Access 2000 with SP3. The problem is the sum of currency
has
$0.01 difference on the total even I use the same equation on all forms.

I have a product which costs $538.20, then add two taxes (7% ---$37.67
and
6% ---$32.29) and the total amount should be $608.16.

Total=Subtotal (1 + Tax1 +Tax2) all controls are formated as currency.
$608.16 = $538.20 + $37.67 + $32.29

The problem is some forms show $608.16 but other show $608.17.

Any suggestions

Thank you

Feb 1 '07 #3

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

Similar topics

0
by: Marcelo López | last post by:
Hello everybody. I'm working with an office pivot table and i have to convert from its currency type to a decimal (in C#) , operate with the result and then re-convert it to the currency type to...
2
by: David Nunn | last post by:
Need to preface that I am not much of an Access type. Doing I have several tables that have currency fields, which I run queries against to compare the figures in both. The data is imported from...
3
by: Mark | last post by:
How do you parse a currency string to a decimal? I'd like to avoid having to parse the number out, removing the $ manually. That sounds like a hack. There are times that this string will be...
7
by: zlf | last post by:
1¡¢Here is a number. double nu = 123 2¡¢Format it with 3¡¢The result is "$123" I want to ask how to deformat "$123" to 123 Thx (Currency symbol is not restricted to '$')
2
by: magister | last post by:
Hello, Is there a way I can validate the input on a textbox for currency including all currency symbols.. At the moment I have it only for the current culture info, but most banks use several...
3
by: Josh | last post by:
I am writing a program where the user inputs currency in US dollars. I want the program to only accept valid currency input, converting the string into the proper type of variable (double?), and...
11
by: Adrian | last post by:
Hi I want to use the following declarations but vb dotnet keeps complaining that currency can't be used because it private ? I have tried it in a module and in the declaration pare same error!...
11
by: MikeY | last post by:
Hi Everyone, I'm trying to extract my pricing from my Access.mdb. Developing WinForm C#. I've read previous posts on the subject, but I'm still confused. In Access my "Price" is of "Currency"...
10
by: Mike9900 | last post by:
Hello, I need a regular expression to match a currency with its symbol, for example Pound66.99 must return 66.99 or Pound(66.99) or Pound-66.99 or -66.99Pound return -66.99 or any other...
14
by: Scott M. | last post by:
Ok, this is driving me nuts... I am using VS.NET 2003 and trying to take an item out of a row in a loosely-typed dataset and place it in a label as a currency. As it is now, I am getting my...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.