I am using the following code for collecting a date from a form and then inserting it in SQL. Most of the users are able to use it without any problem, but recently some users have received the following error upon submitting the form:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'MonthName'
/Page.asp, line 76
The problamatic lines of the code seem to be:
Is there a suntax error or some other error in this code? Thanks.
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'MonthName'
/Page.asp, line 76
The problamatic lines of the code seem to be:
Code:
dim CED
CED = "1/" & MonthName(cint(Request.Form("cmbCCM"))+1) & "/" & Request.Form("cmbTxtCCY")
if Cdate(CED) < date()+2 then
ErrMsg = ErrMsg & "Enter a valid expiration date.<br>"