Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access Lock Files

Posted on 2011-03-16
4
Medium Priority
?
909 Views
Last Modified: 2013-11-29
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
Comment
Question by:ynot8669
  • 3
4 Comments
 
LVL 75
ID: 35154094
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
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 800 total points
ID: 35154098
0
 

Author Closing Comment

by:ynot8669
ID: 35154609
Great ...thanks for the prompt reply
0
 
LVL 75
ID: 35159341
You are welcome.

mx
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question