<% '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") '------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 where month(visitDubai) > 0" 'response.write SQLSearch else if SqlOP <> "" AND EnqMonth = "" then SQLSearch =" select * from enquiries where assignedto= '" & SqlOP &"' and month(visitDubai) > 0" else if SqlOP = "" AND EnqMonth <> "" then SQLSearch =" select * from enquiries where month(visitDubai)= " & EnqMonth response.write "hello" else if SqlOP <> "" AND EnqMonth <> "" then SQLSearch =" select * from enquiries where assignedto= '" & SqlOP & "' AND month(visitDubai)= " & EnqMonth & " AND year(visitDubai)=" & EYR & " and month(visitDubai) > 0" 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 %>
Name Contact Property Date Executive
<%=RsSearch("Cname")%>  <%=RsSearch("phone")%>/<%=RsSearch("email")%>  <%=RsSearch("subject")%>  <%=RsSearch("visitDubai")%>  <%=RsSearch("assignedto")%> 
         
<% RsSearch.Close Set RsSearch=Nothing AdoCon.Close Set AdoCon=Nothing%>