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??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top