On Wed, 10 Sep 2008 07:36:01 -0700, Charles
<(E-Mail Removed)> wrote:
>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.
--
John W. Vinson [MVP]
|