I have an application where when exiting, I ask the user
if they want to back up the data?
No -I exit the application
Yes -then I close the main menu, open a new form
stating "backing up the data" which lauches the code,
then exit the application.
This form uses the onLoad & FormTimer events to call a
module that verifies (or creates it) the "backup"
directory, then copies the backend via the compact
feature. I also add the date & time to the end of the
file name.
a couple of notes:
currently it's only a single user database.
the backup location is "fixed" in the code.
The DBEngine.CompactDatabase won't work if there are any
open links to the data - my main menu did and thats why I
closed it. The backing-up form was to let the user know
what's happening and my way of launching the code.
It was a bit frustrating in the beginning, yet a challenge
I couldn't let go of.
HTH
SteveD
remember that many small steps will eventually get you to
the other side.
>-----Original Message-----
>I have written an Access application to manage an
inventory. I have split
>the data into a separate file and would like to retrieve
and store it in
>another location at each time my application is run.
>
>Is there a way to execute code in Access before the data
file is locked?
>
>Is there a way to execute code in Access after the data
file is released?
>
>An alternate method would be to create a VB application,
have it manipulate
>the data file and then launch Access. This is fairly
easy using a GetObject
>call. But I would need for the VB application to wait
for Access to finish
>and then do a few more things. I'm not sure how to do
this... Any ideas?
>
>Any pointers would be greatly appreciated.
>
>Bob Segrest
>
>
>
>.
>
|