Hi Guys,
I have the following code but can't seem to get the DateDiff to work. Can anyone see what I' ve got wrong.
I request the dates and combine them into one string and then need to error check to see if the Enddate is earlier than the StartDate...
strEndDD = Request.Form ("EndDD" 'get the end date
strEndMM = Request.Form ("EndMM"
strEndYY = Request.Form ("EndYY"
strStartDD = Request.Form ("StartDD" 'get the start date
strStartMM = Request.Form ("StartMM"
strStartYY = Request.Form ("StartYY"
strEnd = strEndYY & strEndMM & strEndDD
strStart = strStartYY & strStartMM & strStartDD
'some validation and checking for the 1st time opening of the form
if not IsDate(strEnd) and not IsDate (strStart) then 'if empty then create the form to request the dates
strNote=0
call CreateForm
elseif DateDiff(d, strStart,strEnd) < 0 then 'if end date not valid
strNote = 1
call CreateForm
...
TIA
Bastien
I have the following code but can't seem to get the DateDiff to work. Can anyone see what I' ve got wrong.
I request the dates and combine them into one string and then need to error check to see if the Enddate is earlier than the StartDate...
strEndDD = Request.Form ("EndDD" 'get the end date
strEndMM = Request.Form ("EndMM"
strEndYY = Request.Form ("EndYY"
strStartDD = Request.Form ("StartDD" 'get the start date
strStartMM = Request.Form ("StartMM"
strStartYY = Request.Form ("StartYY"
strEnd = strEndYY & strEndMM & strEndDD
strStart = strStartYY & strStartMM & strStartDD
'some validation and checking for the 1st time opening of the form
if not IsDate(strEnd) and not IsDate (strStart) then 'if empty then create the form to request the dates
strNote=0
call CreateForm
elseif DateDiff(d, strStart,strEnd) < 0 then 'if end date not valid
strNote = 1
call CreateForm
...
TIA
Bastien