Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

Problem Adding Negative Numbers

$
0
0

Hi


But stuck for a while now on this, any help would be much appreciated. I've been asked to update an old site that runs a sales report to allow negative numbers.
The page runs fine using positive numbers but as soon as a negative number is sumbitted it throws a mismatch error.
Microsoft VBScript runtime
error '800a000d'

Type mismatch: 'CSng'

Here is an a example of one of the lines of code causing a problem have spent a while looking and don't know what I'm missing?

TotalSales = CSng(Cash1) + CSng(Card1) + CSng(Web1)

Thanks


Viewing all articles
Browse latest Browse all 488

Trending Articles