I have what seems to be a simple problem.

In my Dbase i export a query called "events" to asp which works fine on my server. Trouble is if i set the query criteria to =[startdate] Access removes the "=" sign which ultimately means that when i run the Asp i get a return of an empty list. The code runs, it simply finds that no records equal the date.
If i change the "=" to ">=" the code runs fine and returns the correct records.

So essentially i need to know what to put in place of the "=" that access wont remove on save.


As always any and all help is appreciated.

Below is a copy of the offending code

-->>

<HTML>

<TITLE>Events Query</TITLE>

<BODY leftmargin = 185 background = mcst.jpg>

<%
Param = Request.QueryString("Param")
Data = Request.QueryString("Data")
%>
<%
If IsObject(Session("Trinity_conn")) Then
Set conn = Session("Trinity_conn")
Else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Trinity","admin","admin"
Set Session("Trinity_conn") = conn
End If
%>
<%
sql = "SELECT DISTINCTROW Events.EventName, Events.startdate, Events.Status, Events.Notes FROM Events WHERE (((Events.startdate)=#" & Request.QueryString("startdate") & "#)) "
If cstr(Param) <> "" And cstr(Data) <> "" Then
sql = sql & " And [" & cstr(Param) & "] = " & cstr(Data)
End If
sql = sql & " ORDER BY Events.startdate "
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
%>
<TABLE BORDER=1 BGCOLOR=#ffffff CELLSPACING=0><FONT FACE="Arial" COLOR=#000000><CAPTION><B>Events Query</B></CAPTION>

<THEAD>
<TR>
<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>EventName</FONT></TH>
<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>startdate</FONT></TH>
<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Status</FONT></TH>
<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT SIZE=2 FACE="Arial" COLOR=#000000>Notes</FONT></TH>

</TR>
</THEAD>
<TBODY>
<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>
<TR VALIGN=TOP>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("EventName").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("startdate").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Status").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Notes").Value)%><BR></FONT></TD>

</TR>
<%
rs.MoveNext
loop%>
</TBODY>
<TFOOT></TFOOT>
</TABLE>

</BODY>

<BR><BR>

<IMG SRC = "msaccess.jpg">

</HTML>


-->>