UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Numbers Keep Rounding Off, Office 2007    
 
   
enrico
post Mar 3 2012, 07:20 AM
Post #1

UtterAccess Addict
Posts: 211



i have two textboxes with properties of standard integer with 2 decimal places. on the "after update" event of my second textbox i put a simple computation that will multiply the two textboxes, it work well except that whenever i put numbers in textboxes with decimals it keeps rounding off to the higher value (e.g. 36.72 = 37.00, 188.90 = 189.00). how do i resolve this kind of problem?
Go to the top of the page
 
+
cheekybuddha
post Mar 3 2012, 07:32 AM
Post #2

UtterAccess VIP
Posts: 5,486
From: Brixton, front line



QUOTE
textboxes with properties of standard integer with 2 decimal places


Where do you define these properties?

An integer is a WHOLE number only, so I guess the 2 decimal places for display will always be .00

Try using a Single, Double or Decimal datatype.

hth,

d
Go to the top of the page
 
+
arnelgp
post Mar 3 2012, 08:18 AM
Post #3

UtterAccess Ruler
Posts: 1,090



That is because the Control Source of your textboxes is either Integer or Long. Check your form's Record Source and check the underlying table.
Go to the top of the page
 
+
GroverParkGeorge
post Mar 3 2012, 12:46 PM
Post #4

UA Admin
Posts: 19,247
From: Newcastle, WA



Yes, as has already been pointed out, "integer" MEANS "Whole Number Only, No Decimel places". 10 is an integer, 10.3 is not.

If you want to store values as decimels, you have to use a datatype that allows decimels, such as Single or Double. This is at the table level, as has also been pointed out. That's where values are stored. The form will only DISPLAY those values, not determine them.

Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 01:39 AM

Tag cloud: