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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I back up database using VB?

Status
Not open for further replies.

avayaman

Technical User
Nov 6, 2002
841
CA
I have an access database that is stored in a directory on the web. About 4 people who can access this by downloading it, making changes & re-uploading it via FTP. I am usually the only one who works on it, but sometimes when I am away for a couple of weeks, another takes care of it. This works OK, but I have the security set so they can't access the design & that sort of thing. Unfortunately that also kills the backup database choice on the menu. I want to make it easy for them to do this when they download it, just so they have an extra copy in case they foul things up. I would like to make a switchboard item to create a backup. Is this possible?

Paul Beddows

Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com
 
Paul, just so I know how to respond,
why does the back-up choice get 'killed' when you're away?
What gets disabled?

There's many ways to create copies of files.
as ssatech showed, there's an API.
VBA has the FileCopy()
FileSystemObject has CopyFile()
File object has Copy()

I've understand, using the FileSystemObject,
allows you to make a copy, of an open file?

is your DBase split?
 
I have the full menus turned off. They can bring them back by loading it with the shift key pressed, but they don't know that. I dont' want them messing with design view. The Dbase is not split.

Paul Beddows

Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com
 
Try using FileSystemObject().
I believe I've tried it with an open DBase.
Since your Dbase is not split, It may be the only choice.

Dim fso As New FileSystemObject

fso.CopyFile("C:\Dbase.mdb","C:\Documents And Settings\Dbase.mdb", True) 'true = overwrite

...or the API? (can't remember if it copies, open files)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top