Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 912
  • Last Modified:

Access Lock Files

I have a A2010 application with an MDB backend, the lLDB lock file is removed if a menu screen is displayed that does not have a data source or until a form data source is opened. I can therefore copy/backup my backend MDB data from a menu screen or in the Open event of a form.

I have invoked the same code with a ACCDB backend and the LACCDB behaviour is different it remains present until all forms are closed thus preventing a Filecopy in the form open event.

Does anyone have a method for automating a FileCopy for data backup purposes in a form open event using an ACCDB frontend and backend?

As a note I have been able to circumvent this issue when exiting the application by invoking a Form close of the menu form, running the FIlecopy, then Quitting the application ... but still need the ability in a form open event.
0
ynot8669
Asked:
ynot8669
  • 3
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Any open Form or other object that is bound to a linked table in the back end ... will result in the LACCDB file remaining present.

If you must ... you can get around this by use the File System Object and the copy commands contained within ... which will copy an open file, although not recommend to do so in general.

You can set a Reference to the Microsoft Scripting Runtime to get access to the FSO.


Capture1.gif
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
0
 
ynot8669OwnerAuthor Commented:
Great ...thanks for the prompt reply
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You are welcome.

mx
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now