Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset creation Problem 1

Status
Not open for further replies.

billheath

Technical User
Mar 17, 2000
299
US
I have a table, named Table1. In it is a field named [Type], which includes a list of equipment types. I need to open and manipulate a recorset of all records for a particular type. I can use a select query and have it ask the user for the particular type. That works, but I need to do several background operations to the recordset before opening the recordset in read only. <br>
I have tried to create a recordset function that uses the SQL statement, rst=db.openrecordset(&quot;Select * from table1 where [Type] =&quot; & Equipment &quot; &;&quot;. I get the message, &quot;MS Jet Engine cannot find the object 'Select * From table1 where [Type] = Screen&quot;. ie; Equipment = Screen in this case.<br>
<br>
What am I doing wrong?
 
Try the following code<br>
<br>
set rst=db.openrecordset(&quot;select * from table1 where [type]='&quot; & Equipement & &quot;'&quot;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top