<% 'ON ERROR RESUME NEXT '--------Initiliasing variables------------------- Dim AdoCon Dim RsSearch Dim SQLProj Dim RsPrc Dim SQLPrc Dim SqlOP SqlOP = request.querystring("OP") EnqMonth = request.querystring("MON") EYR = request.querystring("YR") 'response.end '------Create Connection----------------------------------- Set AdoCon = server.createobject("ADODB.CONNECTION") AdoCon.Open "Driver={MICROSOFT ACCESS DRIVER (*.mdb)};DBQ=" & server.mappath("/DB/fh.mdb") Set RsSearch = server.createobject("ADODB.RECORDSET") '--------------- SQL Statements ------------------- if SqlOP="" AND EnqMonth = "" then SQLSearch = "select * from enquiries" else if SqlOP <> "" AND EnqMonth = "" then SQLSearch =" select * from enquiries where assignedto= '" & SqlOP &"'" else if SqlOP = "" AND EnqMonth <> "" then SQLSearch =" select * from enquiries where month(enquirydate)= " & EnqMonth else if SqlOP <> "" AND EnqMonth <> "" then SQLSearch =" select * from enquiries where assignedto= '" & SqlOP & "' AND month(enquirydate)= " & EnqMonth & " AND year(enquirydate)=" & EYR end if end if end if end if '---------------------------------------------------------------- 'response.write SQLSearch 'response.end RsSearch.Open SQLSearch,AdoCon,3,3 %> Administrator | View Enquiry Report  

View Enquiries Assigned to: Month
<%DO WHILE NOT RsSearch.EOF%> <%RsSearch.MOVENEXT LOOP %>

 <%=RsSearch("assignedto")%>:<%=RsSearch("enquirystatus")%>

Property : <%=RsSearch("subject")%>
Enq.Date <%=RsSearch("enquirydate")%> Name  : <%=RsSearch("Cname")%>
Email Follow UP
<%=RsSearch("closingcomments")%>
Phone Follow Up
<%=RsSearch("phonefollow")%>
AssignDate <%=RsSearch("enquirydate")%> Country  : <%=RsSearch("country")%>
Visit Date <%=RsSearch("visitDubai")%> Clients Email: <%=RsSearch("email")%>
  View
<% RsSearch.Close Set RsSearch=Nothing AdoCon.Close Set AdoCon=Nothing%>