<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("database\MonthlyReports.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT MyUsers FROM ReportTable WHERE MonthOfReport LIKE 'June' AND YearOfReport like '2010' order by MyUsers", conn
Dim Msg
do until rs.EOF
Msg = Msg & rs("MyUsers") & ", "
rs.MoveNext
loop
'remove the last comma
Msg = left(Msg, len(Msg) - 2)
response.write "The following users haven't submitted their reports last month: " & Msg
%>
|