Running Access in batch file

P

Paul Emmons

I have a batch file that, among other tasks, runs an Access macro to
read a text file as a linked table and export certain of its records
to another text file from a query, per a field in a regular table.

The line in the batch file is like:
C:\progra~1\Micros~1\Office\MSACCESS thedb /xdups

It runs correctly except that the .BAT apparently continues before
Access has finished its work. The output file is not completely
written, sometimes it has not even been created, unless I wait a
second or two.

Is there a way to keep the batch file from continuing before Access
has terminated?

Perhaps a completely different method of running Access from a batch
file would be better, but this is the only way I know thus far. I'm
open to any suggestions.

I could also use VBscript if necessary to solve this problem, but all
in all a batch file seems easier. I do want to run a macro that does
the processing all at once. I have experimented with a VBS script that
accomplishes the same task by seeking one record at a time, but it is
much slower.

I'm running Windows98SE and Access 97.

Thanks for any 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