<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Open(Server.Mappath("yourdb.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select UsersColumn from Customers WHERE MonthOfReport LIKE '%" & MonthName(month(now)-1) & "%' AND YearOfReport like '%" & year(DATEADD("m", -1, now))& "%'", conn
Dim Msg
do until rs.EOF
Msg = Msg & rs("UsersColumn")
rs.MoveNext
loop
rs.close
conn.close
response.write "The following users haven't submitted their reports last month: " & Msg
%>
|