Solved

Why am I getting this error?

Posted on 2009-05-07
2
528 Views
Last Modified: 2013-11-27
Hi Experts,

I have the following VBA. The script works fine in Access 2003 but when I run it in Access 2007 I get a runtime error of 3845. Please see attached picture. How can I solve this problem?

Thanks
'**Establish link to table in 'load region'
        Set dbd = OpenDatabase(DestPathIs & "\" & strDatabase)
        For Each td In dbd.TableDefs
            If Left(td.Name, 4) <> "msys" And Left(td.Name, 1) <> "~" _
                And InStr(td.Name, "ImportErrors") = 0 Then
                DoCmd.TransferDatabase acLink, "Microsoft Access", DestPathIs & "\" & strDatabase, acTable, td.Name, td.Name
            End If
        Next

Open in new window

Error-3845.bmp
0
Comment
Question by:kosenrufu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24325011
Do you have both 2003 & 2007 installed on the same PC?
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 24325100
is your Access 2007 application saved with extension .accdb ?

as the error message says, your current database  have a different format than the database (.mdb) you are trying to link with...
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question