16b8f Run-time error '13': Type mismatch
Sign Up |  Live StatsLive Stats    Articles 37,312| Comments 177,046| Members 19,398, Newest Geezah| Online 436
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Run-time error '13': Type mismatch

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 100 USD (20%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
"Type mismatch in expression" error Rich D Information Technology 1 28-Jul-2006 08:35 AM
Data Type Mismatch Error j Information Technology 1 28-Jul-2006 08:23 AM
Consuming Web Service from Access VBA (Type MisMatch Error) Ayoa Information Technology 1 28-Jul-2006 08:13 AM
condition expression type mismatch error kennethburr@sbcglobal.net Information Technology 3 28-Jul-2006 08:13 AM
Type mismatch in expression. (Error 3615 dwaynesworld013 Information Technology 4 28-Jul-2006 08:03 AM


Tags
runtime, error, type, mismatch
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:17 AM
calmo's Avatar calmo
Guest
 
Posts: n/a
   
   
Run-time error '13': Type mismatch

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
This one is driving me mad! The database I'm working with is meant to
download data into Publisher to create posters, I have one version that
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10969-run-time-error-13-type-mismatch.html
works and one that gives me the Run-time error. The query works, the code
looks right, and just to make life interesting, I created a new copy of the
database importing all of the tables, queries, forms, posters and macros from
the version that works, and I still get the same error message! I know this
isn't much info, but if anyone else has come across anything similar, at
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10969
least I won't feel like I'm going completely mad!!


Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:17 AM
Dirk Goldgar's Avatar Dirk Goldgar
Guest
 
Posts: n/a
   
   
Re: Run-time error '13': Type mismatch

"calmo" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10969
news:A03AE088-A32C-478F-9170-3362F883CF4A@microsoft.com
> This one is driving me mad! The database I'm working with is meant to
> download data into Publisher to create posters, I have one version
> that works and one that gives me the Run-time error. The query
> works, the code looks right, and just to make life interesting, I
> created a new copy of the database importing all of the tables,
> queries, forms, posters and macros from the version that works, and I
> still get the same error message! I know this isn't much info, but
> if anyone else has come across anything similar, at least I won't
> feel like I'm going completely mad!!


It would help a lot if you posted the line of code that is raising the
error. I do have one guess: we often see questions about this error
that are due to a confusion over the Recordset type. For example, in an
Access 2000 or 2002 database, there will be code like this:

Dim rs As Recordset

Set rs = CurrentDb.OpenRecordset(" ... ")

and the error will be raised on the call to OpenRecordset. That's
caused by A2K/A2K2 not having a default reference set to the DAO
library, but instead having a reference to the ADODB library. Both of
those libraries define a Recordset object, but they're not compatibile.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10969
So in the above code, the declaration is understood by VBA as making rs
an ADODB.Recordset, but the OpenRecordset method returns a DAO
recordset. So you get a type mismatch error.

If this is your problem, you must first use the Tools -> References...
dialog to add a reference to the Microsoft DAO 3.6 Object Library (if it
isn't there already), and then *either* remove the reference to ActiveX
Data Objects 2.x Library (if you don't plan to use ADO) *or* change your
declaration of the recordset to:

Dim rs As DAO.Recordset

By explicitly identifying the library whose Recordset object you're
declaring, you remove the confusion.

There are other objects that are defined in both libraries and can cause
confusion. The full list is:

Connection
Error
Errors
Field
Fields
Parameter
Parameters
Property
Properties
Recordset

Note: the following objects exist with the same names in the ADOX and
DAO models as well:

Group
Groups
Index
Indexes
Property
Properties
User
Users

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:17 AM
Douglas J Steele's Avatar Douglas J Steele
Guest
 
Posts: n/a
   
   
Re: Run-time error '13': Type mismatch

Any possibility of Null values being assigned to non-variant variables?

Any possibility of division by zero?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"calmo" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10969
news:A03AE088-A32C-478F-9170-3362F883CF4A@microsoft.com...
> This one is driving me mad! The database I'm working with is meant to
> download data into Publisher to create posters, I have one version that
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10969
> works and one that gives me the Run-time error. The query works, the code
> looks right, and just to make life interesting, I created a new copy of

the
> database importing all of the tables, queries, forms, posters and macros

from
> the version that works, and I still get the same error message! I know

this
> isn't much info, but if anyone else has come across anything similar, at
> least I won't feel like I'm going completely mad!!



Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:17 AM
calmo's Avatar calmo
Guest
 
Posts: n/a
   
   
Re: Run-time error '13': Type mismatch

  Donate Today!  
Brilliant! Removing the ADO worked a treat. Thanks for your help.


"Dirk Goldgar" wrote:

> "calmo" wrote in message
> news:A03AE088-A32C-478F-9170-3362F883CF4A@microsoft.com
> > This one is driving me mad! The database I'm working with is meant to
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10969
> > download data into Publisher to create posters, I have one version
> > that works and one that gives me the Run-time error. The query
> > works, the code looks right, and just to make life interesting, I
> > created a new copy of the database importing all of the tables,
> > queries, forms, posters and macros from the version that works, and I
> > still get the same error message! I know this isn't much info, but
> > if anyone else has come across anything similar, at least I won't
> > feel like I'm going completely mad!!

>
> It would help a lot if you posted the line of code that is raising the
> error. I do have one guess: we often see questions about this error
> that are due to a confusion over the Recordset type. For example, in an
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10969
> Access 2000 or 2002 database, there will be code like this:
>
> Dim rs As Recordset
>
> Set rs = CurrentDb.OpenRecordset(" ... ")
>
> and the error will be raised on the call to OpenRecordset. That's
> caused by A2K/A2K2 not having a default reference set to the DAO
> library, but instead having a reference to the ADODB library. Both of
> those libraries define a Recordset object, but they're not compatibile.
> So in the above code, the declaration is understood by VBA as making rs
> an ADODB.Recordset, but the OpenRecordset method returns a DAO
> recordset. So you get a type mismatch error.
>
> If this is your problem, you must first use the Tools -> References...
> dialog to add a reference to the Microsoft DAO 3.6 Object Library (if it
> isn't there already), and then *either* remove the reference to ActiveX
> Data Objects 2.x Library (if you don't plan to use ADO) *or* change your
> declaration of the recordset to:
>
> Dim rs As DAO.Recordset
>
> By explicitly identifying the library whose Recordset object you're
> declaring, you remove the confusion.
>
> There are other objects that are defined in both libraries and can cause
> confusion. The full list is:
>
> Connection
> Error
> Errors
> Field
> Fields
> Parameter
> Parameters
> Property
> Properties
> Recordset
>
> Note: the following objects exist with the same names in the ADOX and
> DAO models as well:
>
> Group
> Groups
> Index
> Indexes
> Property
> Properties
> User
> Users
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>
>

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Do you believe in...
Today 11:01 AM
179 Replies, 3,706 Views
BHOOTS (Ghosts) and...
Today 10:59 AM
101 Replies, 13,832 Views
Why are There so Many...
Today 10:23 AM
70 Replies, 5,010 Views
Biography of a Scholar:...
Today 06:10 AM
1 Replies, 52 Views
Of Serpents, Pigs,...
Today 05:21 AM
37 Replies, 1,001 Views
How does Sikhi help you...
Today 04:01 AM
16 Replies, 535 Views
Should SPN Keep the...
Today 03:27 AM
16 Replies, 390 Views
Map shows world's 'most...
Today 03:02 AM
15 Replies, 240 Views
Friends. A Testimony to...
Today 02:40 AM
4 Replies, 107 Views
Panjabi
Today 02:27 AM
11 Replies, 232 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 02:13 AM
301 Replies, 7,445 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 01:54 AM
169 Replies, 4,330 Views
Oz magazine apologizes...
Today 01:40 AM
1 Replies, 47 Views
Iman: Sack Liberal...
Today 01:34 AM
0 Replies, 34 Views
Thought of the Moment!
Yesterday 19:38 PM
106 Replies, 5,027 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 12:12 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.39825 seconds with 32 queries
0