Forums
This topic is locked
Use DateAdd with values in form?
Posted 17 Aug 2003 01:14:50
1
has voted
17 Aug 2003 01:14:50 Cathy French posted:
I am trying to compare a date input by user to a future date using date add.I receive the error Request 'object required'
Below is my code:
<script language="VBScript" type="text/VBScript">
<!--
Sub Btn1_OnClick()
Dim IntervalType
Dim Num
Dim Amount
Amount = Request.Form("textYears"

strAccrualDate = Request.Form("txtAccrualDate"

strExpirationDate = Request.Form(txtExpiration)
IntervalType = "d"
Num = Amount * 365
dteNew = DateAdd("d", Num, strAccrualDate)
response.write dteNew
If strExpirationDate <> dteNew then
Dim Message
Message = "The Statute Expiration Date Does Not Equal the Amount of Years permitted for Statute Limitation Deadline on this case! Please check your dates."
MsgBox Message, 0
If txtNotes.value = "" then
MsgBox "You have no notes"
End If
End If
End Sub
-->
</script>
Appreciate any help.