CurrentDb in Access2002

  • Thread starter Thread starter William A. Huntley
  • Start date Start date
W

William A. Huntley

I have used this before, but for some reason I am getting errors when trying
to do it now. I have reference to DA0 3.60. I am getting a Error 13 (Type
mismatch) when the rst line is executed.

Public Sub Test()
Dim dbs As Database
Dim rst As Recordset

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Table1", dbOpenDynaset)

rst.Close
set dbs = Null
End Sub

What am I doing wrong? Even help says this is how to do it.

-wah
 
I had this problem...

Try typing Dim dbs As DAO.Database
Dim rst As DAO.Recordset

Fixed me right up!
 
Right on, that works! And thanks for responding so fast! Thanks!
 
No problem... just wish I could remember who told me, he/she deserves the
real thanks!
 

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

Similar Threads


Back
Top