Type Mismatch error message

G

Guest

I get a type mismatch error message everytime I attempt to close my database.
How can I find the specific data that is causing the error message?
 
6

'69 Camaro

Hi, Terry.
I get a type mismatch error message everytime I attempt to close my database.
How can I find the specific data that is causing the error message?

It's probably one of the forms you have open when you shut down the database.
Instead of closing the database, close each form and report, one by one, until
you get the error message again. When you do, open that form's module and look
in the Form_Close( ) event and Form_Unload( ) event (or the Report_Close( )
event if it's a report). If you don't see anything glaringly obvious (and you
probably won't), then place a breakpoint at the start of these procedures. Open
the form in Form View (or the report in Print Preview), then close it again and
look at the module's procedure in the VB Editor. Step through the code until
you get the Type mismatch error and you'll see which line of code Access is
complaining about.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
 
6

'69 Camaro

Hi, Terry.

One of the most common reasons for this error in Access 2000 and 2002 is that a
Recordset Object isn't disambiguated during the variable declaration. It's
because Access 2000 and 2002 use the ADO library as the default data access
library, but many code snippets you find on the Internet are for the DAO
library, which also has a Recordset Object. If a Recordset Object variable is
used and the library precedence uses the other library, a "Error 13 -- Type
Mismatch" error occurs. For more information on this, please see following Web
page for a link to Access MVP Tom Wickerath's article, "ADO and DAO Library
References in Access Databases":

http://www.Access.QBuilt.com/html/articles.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
 

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