Unlocking Databases for copying

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use the following code to backup (copy) my linked table mdb's
to a floppy disk.
---
Private Sub Command93_Click()

FileCopy "c:\member management\Legion Membership tables.mdb", "a:\Legion
Membership tables.mdb"
FileCopy "c:\member management\Legion Membership tables 2.mdb", "a:\Legion
Membership tables 2.mdb"

End Function
--

When I try it I get a "Permission Denied" message. I assume thisa is
because the tables are locked by the current MDB which is open.

How can I overcome this?

All help appreciated.

Ray
 
Hi Ray

If you close all recordsets in your front-end database which refer to the
linked tables, including all forms that are bound to recordsets based on
those tables, then the file system lock will be dropped. My guess is that
your "Backup" button is on a bound form, or that you currently have another
form open which is bound.
 
Back
Top