Thank you for your help,
I have used this method several times and it works almost all the time. I came across a problem while using a criteria in the design wizard. I am more or less trying to run a filter for two different parameters. I am not sure how to do this with a recordset, I can only use one filter at a time: RS.Filter = "Company_ID = '50772'". So I created a stored procedure using the following statement:
strSQL = "SELECT tbl_Comments_Complaints.Comment_ID, tbl_Comments_Complaints.Company_ID, tbl_Comments_Complaints.Company_Name, tbl_Comments_Complaints.Customer_Comments, tbl_Comments_Complaints.Customer_Rating, tbl_Comments_Complaints.Complaint, tbl_Comments_Complaints.Resolved, tbl_Comments_Complaints.Complaint_Resolution, tbl_Comments_Complaints.Complaint_Filed, tbl_Comments_Complaints.Complaint_Resolved, tbl_Comments_Complaints.Status, tbl_Comments_Complaints.Positive, tbl_Comments_Complaints.Negative, tbl_Comments_Complaints.email, tbl_Comments_Complaints.First_Name_Comp, tbl_Comments_Complaints.Last_Name_Comp, tbl_Comments_Complaints.Approved " & _
"FROM tbl_Comments_Complaints " &_
"WHERE (((tbl_Comments_Complaints.Approved)=True)) " & _
"ORDER BY tbl_Comments_Complaints.Comment_ID; "
However, I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'True'.
/directory/complaint_view.asp, line 43
I am not sure why the criteria, i.e. the record must be equal to true, generates the above error. It seems to work fine in Access 2000 and 2003.
Any help would be welcomed!
|