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

Making an unsecured copy of DB through VBA?

Status
Not open for further replies.

BakeMan

Programmer
Joined
Jul 24, 2002
Messages
129
Location
US
I have been asked to keep a copy of a particular secured database periodically on CD so that we can access it even when our network has gone down. This will only be for emergency retrieval of data in a crisis. The data in the database is not sensitive for viewing but I need to keep the original locked with security to prevent others from editing the information. I want to make a program that automatically backs up this database to cd when a button is pressed. I can make a copy of the database but when go to open it the security prevents me from entering the database. I have to write a shortcut to connect to the .mdw file and enter the proper User Name and Password. This would be a problem because the .mdw file is on the server that would be down in this emergency situation. I could make a copy of this .mdw file also but still have the problem of creating a shortcut to allow them to link. This becomes even more complicated because we plan to access the CD from a battery powered lab top not connected to the network (giving us the ability to access the data even when the power is out). Since you can not open a access database from a CD (it is read only and cannot create the .ldb file) one must copy the database from the cd to the laptop's hard drive prior to opening the database and I can not predict the path the database and .mdw file will be copied to.

So... my question is how can I save a copy of the database with no security on it through VBA. I know I can use the User level Security Wizard to create an unsecured copy, but I was hoping to make it a simple click of a button so our administrative assistant could easily do this once a week.

Any suggestions would be greatly appreciated.

Thank you,

BAKEMAN [pimp]
 
Create a button that copies your mdb file and mdw file to your CD Drive with the FileCopy Command

When you want to restore that file to your local laptop. do a fileCopy back to your laptop. create the exact same directory
on the laptop and copy the mdw file to the directory on your laptop as it would be when running on the server.

you can use the "subst" command from dos to give a certain directory on your local hard drive a new drive letter which will fool the access database that the drive letter (i.e. F:)
is you server. (subst F: C:\restore).

Hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top