Type Mismatch for dimmed Recordset

D

Duane Hookom

The issue most likely is in the references. It might make a difference which
order the DAO and ADO references are listed.

Make sure you always explicitly reference the library
Dim dynTables as DAO.Recordset
Dim dbLocal as DAO.Database
 
G

Gibson

I am using the following code to open up a recordset but getting a "Type
Mismatch" error. This code worked fine on one computer but when I moved to
to a second computer I get the error. After some testing I discovered if I
dim the recordset as DAO.Recordset the problemis solved. Could it be a
reference issue on this machine? If so, any idea what reference is missing?
I can't compare computers because the other computers hard drive crashed,
nothing recoverable.

Dim dynTables as Recordset
Dim dbLocal as Database
Set dbLocal = Currendb()
Set dynTables = dbLocal.OpenRecordset("Tables", dbOpenDynaset)
 

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


Top