Am I missing something

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following code gives a "Type mismatch" error but it is straight out of the VB help menus.

Dim rstTemp As Recordset
Set rstTemp = dbs.OpenRecordset("Data", dbOpenTable)

Any help would be greatly appreciated.
 
Tools > References, make sure Microsoft DAO 3.x is
selected. (You have to be in the VBA editor to go to
references)

Then make this change:
Dim rstTemp As DAO.Recordset



-----Original Message-----
The following code gives a "Type mismatch" error but it
is straight out of the VB help menus.
 
More than likely, you need to (1) open any module, and on the menu, Tools |
References, then set a reference to the Microsoft DAO 3.6 Library (and, just
for safety, move it above the ADO reference in case you miss qualifying a
Dim as described in the following), and (2) qualify all Dims of DAO Objects,
e.g.,

Dim rstTemp as DAO.Recordset

Larry Linson
Microsoft Access MVP
 
Back
Top