<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("MonthlyReports.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select Station from Stations where Station not in (SELECT Station FROM ReportTable WHERE YearOfReport LIKE '%" & Request.Form("MyYearOfReport") & "%' AND MonthOfReport LIKE '%" & Request.Form("MyMonthOfReport") & "%') order by Station", conn
Dim Msg
do until rs.EOF
Msg = Msg & rs("Station") & ", "
rs.MoveNext
loop
'remove the last comma
Msg = left(Msg, len(Msg) - 2)
%>
<center>
The following Stations have not submitted their reports in <% = Request.Form("MyMonthOfReport") %>, <% = Request.Form("MyYearOfReport") %>:<br />
<%
response.write Msg
%>
</center>
|