Solved

Why am I getting this error?

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access Subform Unique Records Issue 14 37
Microsoft Access 2016 Bug? 9 46
Options for Linking SQL tables to Access 2013 9 42
Sort order not as I expected 13 21
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…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

726 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