Results 1 to 5 of 5
  1. #1
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568

    Backup table in Access with specific date ranges - best way

    Hello Guys,

    My process:

    1. split database
    2. in back-end there is one big table with all dates and users which are inputing data which i want to backup.

    Now,
    i would like to create back up automatically once a day - i have already solution and additionally i would like to back up table with dates choose by user.

    So for example administrator wants to backup database for quater 1 from 01-01-2017 to 31.03.2017 so he can choose date range and after that...
    and here what are you solutions Access Gurus?

    My idea is to write code which will be taking data ranges, aplly as filter in query and somehow will be transfering table into new access database.

    Do you have maybe any ideas ?



    Thank you for all your suggestions.
    Best Wishes,
    Jacek Antek

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Create the query that has the records you want to backup. Then you can use that in a Make Table Query to export those records to a new table in another database.
    See post #15 here for what that code may look like: https://access-programmers.co.uk/for...4&postcount=15

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    Just backup the db to a folder;

    Code:
    Dim vTarg,vSrc
    
    vTarg = "\\server\folder\myDb" & format(now,"yyyymmdd-hhnn") & ".accdb"
    VSrc= "\\server\folder\myDb.accdb"
    
    filecopy vSrc, vTarg

  4. #4
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    Hi Guys,

    i have mixed both of your solutions and it is working fine !

    Thank you very much
    Best Wishes,
    Jacek Antek

  5. #5
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome!

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

Similar Threads

  1. Replies: 4
    Last Post: 09-19-2016, 05:02 PM
  2. Replies: 5
    Last Post: 12-12-2013, 12:14 PM
  3. Replies: 1
    Last Post: 11-22-2013, 12:30 PM
  4. Replies: 6
    Last Post: 06-14-2013, 05:43 PM
  5. Replies: 2
    Last Post: 09-13-2011, 11:21 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