Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2006, 09:12 PM
Registered User
 
Join Date: Feb 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to medix_911
Default Automate Backup of backend database

Hello Folks,

I'm trying to figure out a way through VBA and the ontimer event to send a copy of the backend database to a jump drive every so many minutes. This is in a database that i wrote for the auction industry and the data changes every 30 to 45 seconds. If the network or laptop that holds the backend database crashes i need a quick and viable backup to pull. I'm currently using a batch file but would much rather do it with VBA. Any and all help would be greatly appreciated.

I should probably elaborate a little on this project. I have a form within the database that holds default company information to be used throughout the program. Like the path to he artwork for header reports and the likes. This information is used to set properties of forms and reports from the onopen event. I have 2 fields in the form, 1 for BUFile (The file to be backed up) and BULocation (The location to back the file up to) I have tried 7 ways to sunday to automate this through VBA code and have failed so far. If anyone needs more information, don't hesitate to contact me. I have also subscribed to this topic so i will be notified via e-mail when you post and will get back to you as quick as i can.
 
Old August 31st, 2006, 08:16 AM
Registered User
 
Join Date: Feb 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to medix_911
Default

Nevermind folks. I figured it out. For anyone else that would like to automate a back up though. Here is the code i used. You can either put it on a cmd button or i have it set under the ontimer event to fire every 5 minutes.

    Dim SourceFile, DestinationFile

    SourceFile = Forms.frmcompanyinformation.BUFile.value
    DestinationFile = Forms.frmcompanyinformation.BULocation.value

    FileCopy SourceFile, DestinationFile

It's a nice little snipet of code because it allows the user to set which file to back up and where to back it up too by setting file paths in the default company screen.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Path to database backend Clive Astley Beginning VB 6 3 January 12th, 2007 01:29 AM
Access database/SQL Server backend Question vbJupiter Access VBA 1 October 6th, 2006 07:59 PM
Backup Database gaurav_jain2403 SQL Server 2000 0 August 3rd, 2006 12:57 AM
Database Backup [email protected] General .NET 1 February 17th, 2006 08:41 AM
Database Backup prakash.wadkar ADO.NET 1 February 22nd, 2005 01:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.