Solved

Why am I getting this error?

Posted on 2009-05-07
2
520 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

789 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