Simple Access 2000 query in VBA doesn't work

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

sql = "SELECT * FROM Devices WHERE OwningDevice=3"
Set rcs = CurrentDb.OpenRecordset(sql)

When I run the above code in Access 2000's VBA I get a "type mismatch" error
on the second line. But the query is correct and runs ok as a regular
Access query.

What am I doing wrong??
 
Back
Top