I am trying to achieve some validation on my add.asp pages. I have a Field, which holds Date Set (this is the date a Teacher sets a piece of homework). I also have a Date Due Field (this holds the date a Teacher wants the work returned).
When a user fills in this Form, I want to make sure that the Date Due Field contains data which is > greater than that contained in Date Set. So I am comparing the two. I have managed to quickly set it out in Access like below:
Private Sub DatedueAfterUpdate()
Dim strmsg As String
Dim holddateset As Date
Dim holddatedue As Date
strmsg = "Please ensure that your date due is a later date than is contained in date set"
Form addnew.dateset.SetFocus
holddateset = Formaddnew.txtdateset.Text
Form addnew.datedue.SetFocus
holddatedue = Form_addnew.txtdatedue.Text
If CDate(holddateset) >= CDate(holddatedue) Then
MsgBox strmsg, vbCritical
End If
End Sub
Can anyone comment on the necessary changes required to complete this validation to the Add.asp template? Does it need to be a server side action or can it be done at the client end??
Many thanks for any help..
stewart