?
Solved

Why am I getting this error?

Posted on 2009-05-07
2
Medium Priority
?
534 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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 …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

764 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