Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Backup feature...

Status
Not open for further replies.
Sep 10, 2005
40
US
Is there anyway to create a backup feature to add to my church database that I am building? Maybe a button that says backup and copies data information to a specific location. Is there a way to do this? I've seen it in other MSAccess database but I am not that technical to figure it out yet, nor is the other database unlocked to see it. Thanks
 
For a complete copy you can use [tt]VBA.FileSystem.FileCopy()[/tt].
For data only you can use [tt]DoCmd.TransferDatabase()[/tt].

Try looking at some of the databases you already have. A couple of tricks (as long as the database does NOT have an MDE extension).[ol][li]Press and hold the <shift> key when you open the database.[/li][li]You can try <alt>+<F11> to open the Visual Basic Explorer (to see the code).[/li][li]Try <F11> or <alt>+<F1> to show the database window so you can open objects in design view.[/li][/ol]

Hope this helps,
CMP

Funny thing about being unemployed, weekends don't mean quite so much, just means you get to hang out with your working friends. Primus
 
Can someone please help me with a backup solution? Just a simple one would do? Maybe a command that will copy the whole database to a specific drive or a cdrw...anything will help. I'm getting desperate. Thanks
 
Thanks mp9! I didn't think about this and I am a registered user of Winzip. Is there a way to make a command button in MSAccess to do this also. Thanks

 
Probably, but I use the Handy Access Launcher to schedule my Winzip backup jobs (HAL is from although you could also use Windows Task Scheduler to schedule Winzip jobs too thanks to the Command Line add-on that registered Winzip users like yourself can use. Then with HAL or Win Task Scheduler you can set your backup jobs to run automatically.

But if you did want to run it from a command button in access, you'd probably need to look into the Shell command in Access VBA help.
 
I went and downloaded HAL to look and I like the simple interface...the only question I have is where is my backup file located? Thanks
 
Your backup file using the Winzip command line option is created wherever you specify.

A simple example of a one-line batch file (that HAL can schedule to run) would take the form:

[WinZip command-line zipping executable] [Destination ZIP file] [Files to be zipped] [-switches]
For example:
"c:\program files\winzip\wzzip.exe" "g:\mdb\backup\cd.zip" "f:\mdb\cd\*.*" -ex -P -r -u

Creates g:\mdb\backup\cd.zip out of all the files in f:\mdb\cd\

More details on how to structure the batch file and recommended command-line switches to use can be found at
Note that HAL doesn't actually do the backup, Winzip does. You can just use HAL (if you're using it for other db admin tasks) to schedule the Winzip batch file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top