Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Text value to decimal value

Status
Not open for further replies.

newpgm

Programmer
Jan 1, 2010
7
US
I am using CDec but it is not working.. In my table I defined ct_num as decimal with precision as 7 and scale as 2
when I run this it shows error message 3759 " Scaling of decimal value resulted in data truncation.
ct_num=CDec(ct_val)

If I use CInt or CLng it is rounding the number. say 19.24 is saved as 19.

Any thoughts?
 



Hi,

Little code snippets will not do.

Please post ALL your relevent code, including variable declarations.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
True, but "CDbl" might be worth a shot.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top