PC Review


Reply
Thread Tools Rate Thread

annoying error (TypeMismatch)

 
 
=?Utf-8?B?U2FzYW4=?=
Guest
Posts: n/a
 
      22nd Mar 2005
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/
 
Reply With Quote
 
 
 
 
=?Utf-8?B?JzY5IENhbWFybw==?=
Guest
Posts: n/a
 
      22nd Mar 2005
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.


"Sasan" wrote:

> 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/

 
Reply With Quote
 
=?Utf-8?B?U2FzYW4=?=
Guest
Posts: n/a
 
      22nd Mar 2005
awsome thanks ,,,,

"'69 Camaro" wrote:

> 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.
>
>
> "Sasan" wrote:
>
> > 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/

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Typemismatch when duplicating graph PBradac Microsoft Excel Programming 6 3rd Feb 2010 01:58 PM
typemismatch by reading user property Hahn, Thomas Microsoft Outlook Program Addins 11 30th Jul 2008 02:03 PM
TypeMismatch - TreeView Control David C. Holley Microsoft Access VBA Modules 1 13th Nov 2005 02:51 AM
An annoying error Konstantin Loguinov Microsoft Outlook 0 1st Apr 2004 09:14 PM
Annoying Error Ken Microsoft Excel Crashes 0 7th Jul 2003 05:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:14 AM.