Rexolio
Technical User
- Aug 29, 2001
- 230
Hi all,
I have a form where sales people enter their new contracts include 3 different billing fields. At least one of these billing fields must contain an amount other than zero (our sales people are bad about entering contracts without the amounts.) All fields are default to "0".
So, on the processing page, before anything is added to our database, I do the following:
Most of the time it works without a problem. But occasionally they are getting the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'CheckAmount'
/contracts/form2.asp, line 112
Now, I know this happens when someone enters the letter "0" instead of a zero, or they enter someone characther. But its also happening when the user either enters ".00" after the dollar amount, or enters something like ".50" or another cent value in MORE THAN ONE field. If they just add a cent value in one field, no problem. If they add a cent value in more than one field or they add ".00" in any field, this error occurs.
What can I do about this?
Thanks!
![[bugeyed] [bugeyed] [bugeyed]](/data/assets/smilies/bugeyed.gif)
rexolio@bellsouth.net
"I'm not dumb. I just have a command of thoroughly useless information." - Calvin, of Calvin and Hobbes
I have a form where sales people enter their new contracts include 3 different billing fields. At least one of these billing fields must contain an amount other than zero (our sales people are bad about entering contracts without the amounts.) All fields are default to "0".
So, on the processing page, before anything is added to our database, I do the following:
Code:
Billing1 = Request("Billing1")
Billing2 = Request("Billing2")
Billing3 = Request("Billing3")
CheckAmount = Billing1 + Billing2 + Billing3
if CheckAmount = 0 then
Response.redirect("form1.asp?ERROR=Yes")
Response.end
else
'then i add the database insert stuff here
end if
Most of the time it works without a problem. But occasionally they are getting the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'CheckAmount'
/contracts/form2.asp, line 112
Now, I know this happens when someone enters the letter "0" instead of a zero, or they enter someone characther. But its also happening when the user either enters ".00" after the dollar amount, or enters something like ".50" or another cent value in MORE THAN ONE field. If they just add a cent value in one field, no problem. If they add a cent value in more than one field or they add ".00" in any field, this error occurs.
What can I do about this?
Thanks!
![[bugeyed] [bugeyed] [bugeyed]](/data/assets/smilies/bugeyed.gif)
rexolio@bellsouth.net
"I'm not dumb. I just have a command of thoroughly useless information." - Calvin, of Calvin and Hobbes