Results 1 to 5 of 5
  1. #1
    timpepu is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    13

    Automatic backup

    Hi !

    How I can make automatic backup access database , now I have made it with filecopy but it doesn't work because the file is open

    Function Backup()

    Dim CurrentDate As String
    Dim currentime As String
    CurrentDate = Date


    CurrentDate = Format(CurrentDate, "DDMMYY")
    FileCopy "\\Public\thy.mdb", "\\backup\thy" & "_" & Format(Date, "DD-MM-YY") & ".mdb"
    End Function

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    this isn't really an Access question; it is a TaskManager question of the OS.

  3. #3
    timpepu is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    13

    Access Backup

    Hi !

    In my mind it is really an Access question if I'm trying to run it automaticly from Access ??????

  4. #4
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    well I will haggle on that point; as in any case it is still a system command you are dealing (file copy) with and would be identical whether or not you were in any of the Office products.....plus the term "automatic" implies unintended - where inside Access it is triggered by an event.

    But be that as it may; one assumes that one really needs to back up just the data - thus you should split the db - and then trigger the copy of the BE only. It will permit you to do that while in Access. One will never be able to copy the FE while in it because the .ldb exists - but there should never be a need for this.

  5. #5
    drramini is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    1

    Backup

    I know it's too late. I was looking for such code to make a backup for me. First of all, thank you for the code you supplied. Second of all, the access needs to close the database to make a copy. Then, if you add "DoCmd.Quit" before the copy, as I did on a Quit bottom, the code works, so when you close the database, it automatically copies and backups.


    Quote Originally Posted by NTC View Post
    well I will haggle on that point; as in any case it is still a system command you are dealing (file copy) with and would be identical whether or not you were in any of the Office products.....plus the term "automatic" implies unintended - where inside Access it is triggered by an event.

    But be that as it may; one assumes that one really needs to back up just the data - thus you should split the db - and then trigger the copy of the BE only. It will permit you to do that while in Access. One will never be able to copy the FE while in it because the .ldb exists - but there should never be a need for this.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Save backup as valid name
    By timpepu in forum Access
    Replies: 0
    Last Post: 12-18-2009, 03:03 AM
  2. Automatically createing Backup.mdb file
    By nareshk in forum Access
    Replies: 3
    Last Post: 11-16-2009, 12:47 PM
  3. Access DB backup & restore
    By paulfr in forum Access
    Replies: 1
    Last Post: 09-09-2009, 04:07 AM
  4. Makig Backup of data
    By wasim_sono in forum Access
    Replies: 5
    Last Post: 07-17-2006, 08:40 AM
  5. Making a backup copy of table or database
    By wasim_sono in forum Access
    Replies: 0
    Last Post: 03-09-2006, 05:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums