annoying error (TypeMismatch)

S

Sasan

hi

i am trying simply to open a recordset but it gives me an error ( Type
Mismatch),, i used to this before without any problem,, would you guys take a
look at it... appreciate your help

Dim myDB As Database
Dim temp As Recordset
Set myDB = CurrentDb
Set temp = myDB.OpenRecordset("myTable",dbOpenTable)


i dont know why i get "typemismatch "error. everything seems to be alright
here/
 
6

'69 Camaro

Hi, Sasan.

The ADO object library is interfering with your DAO code. Replace the
following line of code:

Dim temp As Recordset

with:

Dim temp As DAO.Recordset

.... and ensure that the DAO object library reference is included in the
database.

For more information on ADO and DAO library reference problems, please see
the following Web page for Tom Wickerath's tip: "ADO and DAO Library
References in Access Databases":

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 as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. (Only "Answers" have green
check-marks.) 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.
 
S

Sasan

awsome thanks ,,,,

'69 Camaro said:
Hi, Sasan.

The ADO object library is interfering with your DAO code. Replace the
following line of code:

Dim temp As Recordset

with:

Dim temp As DAO.Recordset

... and ensure that the DAO object library reference is included in the
database.

For more information on ADO and DAO library reference problems, please see
the following Web page for Tom Wickerath's tip: "ADO and DAO Library
References in Access Databases":

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 as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. (Only "Answers" have green
check-marks.) 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.
 

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

Top