I wrote the following code:<br>
Function FindS(Area As String)<br>
<br>
Dim db As Database<br>
Dim rst As Recordset<br>
Dim strSQL As String<br>
Set db = CurrentDb<br>
strSQL = "SELECT * FROM Table1 WHERE Type = " & Area<br>
Set rst = db.OpenRecordset(strSQL, dbOpenTable)<br>
<br>
End Function<br>
<br>
When I try to run it (with Area = "Screen"
, I get the message: "the MS Jet Database engine could not find the object 'Select * from table1 where type = Screen'. Make sure the object exists ...<br>
<br>
Thanks for your help!
Function FindS(Area As String)<br>
<br>
Dim db As Database<br>
Dim rst As Recordset<br>
Dim strSQL As String<br>
Set db = CurrentDb<br>
strSQL = "SELECT * FROM Table1 WHERE Type = " & Area<br>
Set rst = db.OpenRecordset(strSQL, dbOpenTable)<br>
<br>
End Function<br>
<br>
When I try to run it (with Area = "Screen"
<br>
Thanks for your help!