Adding Decimals display wrong value

WineSnob

Not Bright but TENACIOUS
Local time
Today, 07:59
Joined
Aug 9, 2010
Messages
211
I have 2 controls on a form cmbFed and cmbState both are formatted as fixed with decimal places as 2. They display the correct values.​
cmbFed = .18​
cmbState = .06​
When I add a new control to add the 2.​
=[cmbFed]+[cmbState] result is .18.06​
instead of .24​
It looks like it is treating them as text.​
I even tried to do it in code​
Me.text639 = Me.cmbFed + Me.cmbState with the same results.​
It must be something simple I am missing a format for text639 or ?????​
Thanks.​
 
try Clng(cmbFed) + Clng(cmbState)
And yes it is treating them as text if you get those results.
 
That produces the result 0 and it is justified left like text.
 
That did it. Thanks to Minty and JHB.
 
Oops - yes sorry - less haste more speed...
 

Users who are viewing this thread

Back
Top Bottom