A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

rounding problems



 
 
Thread Tools Display Modes
  #11  
Old September 16th, 2009, 08:44 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default rounding problems

On Wed, 16 Sep 2009 10:17:10 -0700, "voodoo" wrote:

Thanks Gina,

That seemed to do the trick although I'm not sure why?

To get the number to show only one decimal I did have to change your
equation
from: =Int([YourField]*100)/100
to: =Int([YourField]*10)/10


PMFJI but...

54.9876543210 * 10 is 549.876543210

Int just takes the integer part, discarding (not rounding) the fraction, so
Int(54.9876543210*10) is 549.

Dividing that by 10 gives 54.9.
--

John W. Vinson [MVP]
  #12  
Old September 16th, 2009, 08:51 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default rounding problems

THANK YOU THANK THANK YOU

I knew it was something simple.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"John W. Vinson" wrote in message
...
On Wed, 16 Sep 2009 10:17:10 -0700, "voodoo"
wrote:

Thanks Gina,

That seemed to do the trick although I'm not sure why?

To get the number to show only one decimal I did have to change your
equation
from: =Int([YourField]*100)/100
to: =Int([YourField]*10)/10


PMFJI but...

54.9876543210 * 10 is 549.876543210

Int just takes the integer part, discarding (not rounding) the fraction,
so
Int(54.9876543210*10) is 549.

Dividing that by 10 gives 54.9.
--

John W. Vinson [MVP]



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.