checoturco
Registered User.
- Local time
- Yesterday, 16:25
- Joined
- Oct 17, 2005
- Messages
- 76
Hi all,
in my tables i have decimal values with comma but when i try to make some operations with vba code, i get a error because the comma.
i have this code to substitute the value but if the value is 0,612 for example,
my pe variable gets the value 612.
i already try with double but i get the same error.
Dim mulqtpeso As Double
Dim pe As Double
Dim rpl As Double
...
rpl = DLookup("[pxtr]", "relape", "[mat]=" & rs("mat") & "") 'rpl=0,612
pe = CDec(Replace(rpl, ",", "."))
mulqtpeso = rs("quantidade") * pe
if somebody has any idea to solve this i apreciate
tks all in advance
checo
in my tables i have decimal values with comma but when i try to make some operations with vba code, i get a error because the comma.
i have this code to substitute the value but if the value is 0,612 for example,
my pe variable gets the value 612.
i already try with double but i get the same error.
Dim mulqtpeso As Double
Dim pe As Double
Dim rpl As Double
...
rpl = DLookup("[pxtr]", "relape", "[mat]=" & rs("mat") & "") 'rpl=0,612
pe = CDec(Replace(rpl, ",", "."))
mulqtpeso = rs("quantidade") * pe
if somebody has any idea to solve this i apreciate
tks all in advance
checo