Hi.
In my references library list, I have the "Microsoft DAO 3.6 Object Library".
So I wonder why I'm getting this error knowing that my code was running
normaly before that and I haven't changed it.
The ADO library is interfering with the DAO library, since both contain the
Recordset object. You can avoid this problem by either specifically
declaring the DAO Recordset instead of the Recordset of the library of the
highest library by using the following in your declaration:
Dim Rst as DAO.RecordSet
Or you can set the DAO library to have higher precedence than the ADO
library in your database's References Collection. For more information on
these library references, please see Tom Wickerath's tip: "ADO and DAO
Library References in Access Databases" on the following Web page:
http://www.Access.QBuilt.com/html/gem_tips1.html
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts, so that all
may benefit by filtering on "Answered questions" and quickly finding the
right answers to similar questions. Remember that the best answers are often
given to those who have a history of rewarding the contributors who have
taken the time to answer questions correctly.
jouj said:
Hi,
I'm Using MS Access XP.
In my VBA Code, sometimes I encounter this error when running a function
from VBA: "Type Mismatch" on the line:
[Dim Rst as RecordSet]
--> Set Rst = Currentdb.OpenRecordSet (sql statement)
....
Or "Method not found" on the line:
--> Rst.Edit
In my references library list, I have the "Microsoft DAO 3.6 Object Library".
So I wonder why I'm getting this error knowing that my code was running
normaly before that and I haven't changed it.
Thanks in advance.