Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old August 30th, 2006, 10:12 PM
Registered User
Join Date: Feb 2006
Location: hillsboro, Ohio, USA.
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.
Reply With Quote
  #2 (permalink)  
Old August 31st, 2006, 09:16 AM
Registered User
Join Date: Feb 2006
Location: hillsboro, Ohio, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to medix_911

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.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 08:59 PM
Backup Database gaurav_jain2403 SQL Server 2000 0 August 3rd, 2006 01:57 AM
Database Backup ullasmathew007@yahoo.com General .NET 1 February 17th, 2006 08:41 AM
Database Backup prakash.wadkar ADO.NET 1 February 22nd, 2005 01:06 PM

All times are GMT -4. The time now is 01:18 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.