Running Batch File

S

Sash

I receive a report from a client and need to run it through Monarch in order
to get the data into my database. I've created a batch file that works great
to facilitate this, but would like to run this from a form in Access. I have
the following code and it looks like it's doing something, but it doesn't.
When I run the flat file from Windows Explorer it works fine. Any help would
be greatly appreciated.

Shell ("C:\AA.bat")
 
K

Klatuu

Are you sure it isn't running?
I just did a test using the syntax you posted and it did work.
If you are unsure, try adding a PAUSE command to the bat file. Something
like:
PAUSE "Stopped For Testing"

Then run the bat file. The command window may be minimized on the task bar,
so you will have to open to see. Could be the commands in the bat file are
not executing because of syntax error.
 
S

Sash

Klatuu,
Looks like my problem is that I'm trying to populate tables in the open
database with the batch file. If I open the database and run the batch file,
the tables do not get populated. If I close the database and run the batch
file, the tables get populated. Maybe something in my batch file needs to be
changed or I'll need to have a separate database to hold the data?? Any
thoughts?
Thank you,
Sash
 
S

Sash

My database is not split. Is this a better way to approach? How would I
know if it's open in exclusive mode?
 
K

Klatuu

Go to Tools, Options, Advanced
Select Shared under Default open mode
Select No locks Default record locking
Check Open databases using record-level locking

Make a backup copy of your database.
Run the database splitter wizard.
change your bat file to point to the back end database it will be the name
of your database with _be added to it:
MyApp.mdb = Front End
MyApp_be.mdb = Back End

Change your bat file to use the _be version.
I think this should cure it.
 
S

Sash

Default setting for opening database is "Shared"....maybe I should have a
separate database with my tables and link to them??
 

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