best method for back-up

C

Charles

I have office reps who are out in the field with laptops. I've provided them
with a runtime database from Access to record their activities and then
e-mail in their data. As part of setting them up, I have instructed the
run-time to export two critical data tables as an excel spreadsheet to their
C drive as a back-up everytime they exit the program. This causes windows to
prompt the user as to whether they want to overwrite the existing files. I
want the overwrite to always occur. I was thinking I could either create a
batch file that deletes the back-up files and opens the run-time OR, I could
write VB code wihtin the run itself that deletes the files right before the
run-time re-creates them. Assuming these are as viable as any other possible
method, what would be the code either in DOS or VBA to perform this action?
I know the delete command in DOS but I'm not sure how to write the line that
would open the run-time. If I use the VBA method, I'm not sure how to
execute a DOS command within the run-time.
 
J

John W. Vinson

I have office reps who are out in the field with laptops. I've provided them
with a runtime database from Access to record their activities and then
e-mail in their data. As part of setting them up, I have instructed the
run-time to export two critical data tables as an excel spreadsheet to their
C drive as a back-up everytime they exit the program. This causes windows to
prompt the user as to whether they want to overwrite the existing files. I
want the overwrite to always occur. I was thinking I could either create a
batch file that deletes the back-up files and opens the run-time OR, I could
write VB code wihtin the run itself that deletes the files right before the
run-time re-creates them. Assuming these are as viable as any other possible
method, what would be the code either in DOS or VBA to perform this action?
I know the delete command in DOS but I'm not sure how to write the line that
would open the run-time. If I use the VBA method, I'm not sure how to
execute a DOS command within the run-time.

The KILL statement in VBA will delete files. See the online help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top