Hi Ron,
As Glenn mentioned, using DAO.Recordset will work; it is because when you
create a new Access database (an MDB file) in Access 2000, Access assumes
that you'll want to work with ADO and sets a reference for you to the
Microsoft ActiveX Data Objects (ADO) 2.1 Library.
Since ADO library and DAO library contain some objects with the same name,
we can distinguish them use their own ProgID. For example, we use
DAO.RecordSet to declare a RecordSet object of DAO library,
we use ADODB.RecordSet to declare a RecordSet object of ADO library.
For more information about this behavior in Access 2000, please refer to
the following Knowledge Base article:
Q225962 ACC2000: By Default, New Databases Don't Reference DAO Library
http://support.microsoft.com/support/kb/articles/q225/9/62.asp
Please feel free to reply to the threads if you have any concerns or
questions.
Sincerely,
Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <
www.microsoft.com/security>
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Ron Carr" <
[email protected]>
X-Tomcat-NG: microsoft.public.access.modulesdaovba
|
| The following code gives me a "Type Mismatch" message on the set rstdef
| line.
| My Refernce is set to Microsoft DAO 3.6 Object Library
| I know I have used identical code hundreds of times!
| I have rewritten this a couple of times with different tables.
| Any idea what is wrong?
|
| Dim dbdef As Database
| Dim rstdef As Recordset
| Set dbdef = CurrentDb()
| Set rstdef = dbdef.OpenRecordset("ECCLetters")
|
|
|