<% '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 All Enquiries

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

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

 Property :<%=RsSearch("subject")%> AssignDate Follow up
  Country  :<%=RsSearch("country")%>  <%=RsSearch("enquirydate")%>  <%=RsSearch("closingcomments")%>
 Clients Name  :<%=RsSearch("Cname")%>   Phone Follow up
  Clients Email:<%=RsSearch("email")%>     <%=RsSearch("phonefollow")%>

View

   
     
<% RsSearch.Close Set RsSearch=Nothing AdoCon.Close Set AdoCon=Nothing%>