Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 6th, 2005, 03:12 PM
Authorized User
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada.
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lguzman
Default Error 13 Type Mismatch

Good day all.

I am getting an error '13' Type Mismatch on the following line of the following code:

Private Sub Text45_AfterUpdate()
Dim wrkDefault As Workspace
Dim dbs As Database
Dim rst As Recordset
Set wrkDefault = DBEngine.Workspaces(0)
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tInvent") <<<<<------- error 13
wrkDefault.BeginTrans
...


I don't see why! Please help!

Thanks.




[LGuzman]
__________________
[LGuzman]
Reply With Quote
  #2 (permalink)  
Old January 6th, 2005, 03:52 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I may be wrong here but aren't you missing a step?

Dim dao As DAO.DBEngine
Dim wks As Workspace
Dim dbs As Database
Dim rst As Recordset

Set dao = CreateObject("DAO.DBEngine.35")
Set wks = dao.Workspaces(0)
Set dbs = wks.OpenDatabase(strDBName)
Set rst = dbs.OpenRecordset(strTableName)

See http://www.oreilly.com/catalog/proga...pter/ch02.html

I don't do any DAO really, so I hope this helps.




mmcdonal
Reply With Quote
  #3 (permalink)  
Old January 6th, 2005, 10:19 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think problem is with ur database virsion. if it is MS Access 2003 or higher convert it to 2000. Send me ur full project and database myotherdocuments@yahoo.com

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting runtime error 13: type mismatch rita9 Beginning VB 6 2 March 14th, 2008 04:36 AM
Error Number 13 : Type Mismatch ryoga_7482 BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 2 January 31st, 2008 02:20 AM
runtime error '13' type mismatch denkidude Visual Basic 2005 Basics 5 March 15th, 2007 10:28 PM
Why am I getting Runtime Error 13: Type Mismatch? dan_thorman Excel VBA 1 January 24th, 2007 02:06 PM
run-time error 13: type mismatch bryan.lugo Excel VBA 2 April 19th, 2006 04:39 AM



All times are GMT -4. The time now is 09:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.