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

access currency and decimals

Hi all,

Im having trouble with currency formatting and the amount of decimals displayed. Most of my stored values are pretty standard ($10.50). Some item have a 4 decimal place cost though ($.0025). I have the table formatted to store 4 decimal places but when using the currency format it drops the last two places of the value. Is there a way around this or do i have to use general number format for the table? I also dont want the field to display 4 digits after the decimal if its not necessary. ($50.00 instead of $50.0000)
May 30 '06 #1
2 3620
PEB
1,418 Expert 1GB
Hi,

As format of your digits you should choose General with 2 decimal places... But when there is .00 the .00 not be shown also!

There is functions to do truncation

For exemple you can use the follow:

Int(My_number*100+0.5)/100

So if your nember is 105.002
then 10500.2+0.5=10500.7
after int it gives 10500 then / 100 = 105.00 :)
Sep 3 '06 #2
comteck
179 100+
There's something I'm not understanding here. Why do you have your table set up to display 4 decimal places, when you only want 2 for your currency?

comteck
Sep 5 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: digitalavatar | last post by:
I am having a problem with my Access 2000 front end to a SQL 7 or 2000 database. I create a table in SQL with a field named, say, amt, data type MONEY. When I link the table in Access using ODBC,...
6
by: Mitchell Vincent | last post by:
Just making sure I'm not missing the boat here, but are there any special routines for doing currency math (fixed precision stuff) in .NET? The wonderful problems of doing math on decimals tend...
1
by: D. Shane Fowlkes | last post by:
Quick question - I have output from a Money MS SQL field going into a repeater's dataitem. The db does not store any cents (decimals). How can I get this on the page: ...
2
by: crferguson | last post by:
Hello all! I'm having the oddest issue trying to format a numeric string as currency without decimals. For instance... strSalary = "120000.56" strSalary = Format(strSalary, "$#,##0") 'this...
1
by: pebelund | last post by:
Hi I got an .aspx that got the following code (example) <td width="120"> <% = row %> </td> row takes a value from a SQL db, that is a string of numbers. On the webbsite I want this to show...
1
by: roger2282 | last post by:
help, I am trying to update a field on my database and cant seem to get the right value stored eg on reading the database field i get the values I need such as 31.24, 3.15 and 16.00 and I...
3
by: Jx4 | last post by:
Hi there, I am currently having trouble with some issues with adding Currency values. I have one column with values of transactions and the other column has a running total. It works great...
1
by: Warren Thai | last post by:
I am using Access 2003. I need to export data from a query to a .txt file. I know how to do this but however there is a problem with my data being rounded. The numbers in the data have 3 decimal...
1
by: =?Utf-8?B?eXVyaWtz?= | last post by:
Hey, I'm building a business application that needs input of currency data. I looked a lot around google and friends for a good custom control to provide interactive validation and formatting of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.