-
October 23rd, 2012, 08:17 PM
#1
Trap for Young (and Old) Players - (Text Box Formatting Trap)
I cant believe I have never come across this problem before (Its now about 14 years working with VB6 on a daily basis)
I tested software on my machine - worked well !
Ran on the customer machine and kept getting strange results
Finally tracked it to this statement
Code:
ValIncTax = Val(txtInvValue.text)
ValIncTax is a Currency Type
txtInvValue.text is a Text Box
Here is the problem
The Text Box had the value formatted as ##,###,##0.00
eg, 3,245.65
What was being transferred to ValIncTax was just the 3 ! (The rest was truncated off)
Worked on my machine because I was using figures no larger than 999.99
So there's one for the books !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|