Only at startup, and before pressing the submit button, the code below gives the following error:
> Microsoft VBScript runtime error '800a000d'
> Mismatch type: 'cdate'
(refers to the 'cdate' on the last section of code below)
After the first press on the submit button, the requested table (from 01/01/2021) appears on the screen without hitches (and also a new table after changing the date in the date picker and a press on the submit button).
(request.form via METHOD="POST")
Question : (how) can I avoid that initial error message (at the start) ?
Thanks for tips.
> Microsoft VBScript runtime error '800a000d'
> Mismatch type: 'cdate'
(refers to the 'cdate' on the last section of code below)
After the first press on the submit button, the requested table (from 01/01/2021) appears on the screen without hitches (and also a new table after changing the date in the date picker and a press on the submit button).
(request.form via METHOD="POST")
Question : (how) can I avoid that initial error message (at the start) ?
Thanks for tips.
Code:
<input type="date" name="datA" placeholder="DD/MM/YYYY" value="2021-01-01">
<tr>
<td><input type="submit" name="Submit" value="Submit">
</td></tr>
<%
CurrentDay = right(request.form("datA"),2)
CurrentMonth = mid(request.form("datA"),6,2)
CurrentYear = left(request.form("datA"),4)
%>
<%
Dim Conn, rs, sql
Set Conn ...
...
rs.Open sql, Conn
%>
<%
Do While rs("Dat")>=[b]cdate[/b](CurrentDay&"/"&CurrentMonth&"/"&CurrentYear)
... (table)
rs.MoveNext
loop
%>