My Assistant
![]() ![]() |
|
|
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?
|
|
|
|
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 |
|
|
|
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.
|
|
|
|
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 Top · Lo-Fi Version | Time is now: 24th May 2013 - 01:39 AM |