Running batch files in MSAccess 2010

macca2153

New Member
Joined
Feb 11, 2008
Messages
18
I have migrated to access 2010 from 2007. I had a macro which ran a batch file to call another application which worked in 2007 but does not work in 2010. The macro used the Run Application command which has a warning icon shown in design mode.
When I run the script the MS DOS screen flashes up showing the relevant commands but does not perform the actions.
I have tried to create a function using shell without any success including copying and editing script from the net.
Can anyone advise an approach which may help?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
This first thing you want to do is make sure that your batch file actually runs, independent of Access?
What happens if you try running the batch file directly (outside of Access)? Does it work then?
If your batch file calls certain programs (like Access or Excel), you may need to update your batch file code, as the Program executables are in different folders in different versions of Office.
 
Upvote 0
Joe,
I currently have a macro with the Run Application command. The editor places a warning icon next to the command when I open the macro in design mode. When I run the macro, the MSDOS screen flashes up and closes but the batch file is not actioned. Note - the same macro works in Access 2007.
I tried the shell command with the same result.
Thanks for trying.
 
Upvote 0
What exactly does the batch file do?
 
Upvote 0
The batch file runs a program called Monarch which can be used to reformat data for use in a database. This batch files reformats several files.
 
Upvote 0
I don't understand why the batch file wouldn't run when called from Access, though I have never used Monarch before. These things can be hard to debug without having access to your environment.
 
Upvote 0

Forum statistics

Threads
1,221,904
Messages
6,162,743
Members
451,785
Latest member
DanielCorn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top