I don't know if this will work for sure I have not tested it.  Recently when I 
had some float problems using the val() function sorted the calcuations out.

Maybe this
LSCurrencyFormat(val(MONEYVALUE),'none')

OR

val(LSCurrencyFormat(MONEYVALUE,'none'))

will do the trick.  Apparently it is all to do with the figure not being read 
correctly as a floating point.  I beleive evaluate() has a similar effect in 
correcting floating point calculations.

Hope it helps.

cheers
Martin 


> I'm trying to manipulate the values in a query, by selecting a money 
> value and replacing it with a formated value.
> 
> QuerySetCell(qryTest,"MONEYVALUE",LSCurrencyFormat(MONEYVALUE,'none'),
> currentrow);
> Original value: 123.45
> Replace value: 123,45
> 
> But when I insert the new formated value, sometimes the value converts 
> to a totally different value.
> After some research I found that if a value had descimal number 12 or 
> less the value changed from 427,08 to -537787, but for decimal value 
> lager than 12 there was no problem.
> 
> 
> Dump of query before manipulation
> 
  
>       FLOATVALUE      MONEYVALUE
> 1     427.05  427.0500
> 2     427.06  427.0600
> 3     427.07  427.0700
> 4     427.08  427.0800
> 5     427.09  427.0900
> 6     427.1           427.1000
> 7     427.11  427.1100
> 8     427.12  427.1200
> 9     427.13  427.1300
> 10    427.14  427.1400
> 11    427.15  427.1500
> 12    427.16  427.1600
> 13    427.17  427.1700
> 14    427.18  427.1800
> 
> 
> Dump of query after manipulation
> 
  
>       FLOATVALUE      MONEYVALUE
> 1     -537879 -537879
> 2     -537848 -537848
> 3     -537818 -537818
> 4     -537787 -537787
> 5     -537756 -537756
> 6     -537726 -537726
> 7     -537695 -537695
> 8     -537665 -537665
> 9     427,13  427,13
> 10    427,14  427,14
> 11    427,15  427,15
> 12    427,16  427,16
> 13    427,17  427,17
> 14    427,18  427,18
> 
> What is the reason for this problem?
> 
> Please help me :)
> 
> Best regards
Frode

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241915
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to