I am receiving this following error message for this particular section of code. I am working on some ASP pages for an Access database. The only problem I can see is possibly that the FormID is listed as Autonumber in the Access database and I think the replace funtion is looking for a string variable. Any suggestions on what the problem may be? Line 57 is in bold.
Thanks!
Error Message:
Technical Information (for support personnel)
Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/hawksnest/form22/approver.asp, line 57
%>
<%
Dim rsAccept__MM_ColParam
rsAccept__MM_ColParam = 1
If (Request.QueryString("FormID") <> "") Then
rsAccept__MM_ColParam = Request.QueryString("FormID")
End If
%>
<%
Dim rsAccept
Dim rsAccept_numRows
Set rsAccept = Server.CreateObject("ADODB.Recordset")
rsAccept.ActiveConnection = MM_mis_STRING
rsAccept.Source = "SELECT FormID,Submitteddate,InitiatoruserID,Isfname,Islna me,Isrank,Isemail,IsDSN,InitUID,InitLName,InitFNam e,InitEmail,InitDSN,InitRank,Savdollar,Savman,Init Def,InitRtmc,PubNo,BDate,CNo,CDate,WPack,PNo,ParNo ,Fig,Priority,Change,PubID,PubCategory FROM dbo_TForm22,dbo_TF22Control,dbo_TF22InitPOC,dbo_TF 22Defrtmc,dbo_TF22Pubs,dbo_TF22Routing,dbo_tzPubli cationCategory WHERE FormID = '" + Replace(rsAccept__MM_ColParam, "'", "''") + "'"
'AND TF22Control.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND InitUID = InitiatoruserID AND TF22Defrtmc.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND TF22Pubs.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND TF22Routing.FormIDfk = " + Replace(rsAccept__MM_ColParam, "'", "''") + " AND PubID = PubNo"
rsAccept.CursorType = 0
rsAccept.CursorLocation = 2
rsAccept.LockType = 1
rsAccept.Open()
rsAccept_numRows = 0
Approver = request.QueryString("Approver")
%>