Backing up access 2007

Posted on 2011-04-25
Last Modified: 2012-05-11
I have a client that needs to perform a local backup of the data tables. I cannot find an easy way to build that into a user friendly process. I have an Add-in from Helen Feddema but that requires use of a menu that I have disabled. Is there a simple routine for backing up the data? OR Is there a way to activate the Addin Menu to run the backup routine in the addin menu?

Thanks for arr your advice.
Question by:MikeOsborne
    LVL 84
    Is this a split database? If so, then no, there's really no simple method to do this. You must (a) shell out to another process (Access, VB, VB.NET, etc), (b) perform the backup, and then (c) relaunch the database.

    Author Comment

    Yes, this is a split database. The backup would be done as the user is exiting before the database is closed. Do you have a web site where I could find the code?
     Thanks, Mike
    LVL 6

    Accepted Solution

    I have used the dbengine.compactdatabase method to achieve the same result in the past. From memory, you need to make sure the tables are not in use.
    IE run this from a main menu after all form are closed.
    dbengine.compactdatabase C:\folder1\yourbackend.mdb, C:\folder2\yourbackup.mdb

    LVL 6

    Expert Comment

    LVL 6

    Expert Comment

    Just dug up the DB where I used this, it was Access97 so no wonder I could not recall the details.
    So here is a caveat.
    It was designed for a single user only.
    Perhaps you could check for the LDB in a multi user environment.


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    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 …
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now