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
Here is the problemCode:ValIncTax = Val(txtInvValue.text) ValIncTax is a Currency Type txtInvValue.text is a Text Box
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 !


Reply With Quote
Bookmarks