By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,789 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Problems with a macro using the RunApp Action

P: 5
I've run into this issue and it started last week. I maintain numerous databases that use the RunApp action and have had no problems in the past. I currently have five databases that have a button on a switchboard that runs a macro that uses the RunApp action to run a batch file that will get data from various places to populate my tables. The user then goes on to click other buttons for various reasons.

The following is the command line used to open one of my batch files:

\\bfe9058fp10\userdata\Accounting Operations\LOAN RECON\CLCS Loan Variances\PLC902D.bat

' \\bfe9058fp10 = the server

Until last week, this command worked flawlessly as it has for the past year and a half. Now, all of a sudden, I get...

"Microsoft Office Access can't invoke the application using the RunApp action. The path to the application is invalid, or a component of the application is missing. Check the path in Windows Explorer or File Manager."

Any insight into the reason that this is happening? It really has worked for the past almost 2 years without a hitch. I've had recommendations to convert to vb with the shell command. I've also been told that I need to pass in the path to the command prompt application and then the path to my batch file. Why would I need to do any of this when it has worked without it for so long?

Thank you,

Robert
Aug 8 '07 #1
Share this Question
Share on Google+
6 Replies


Rabbit
Expert Mod 10K+
P: 12,392
I've run into this issue and it started last week. I maintain numerous databases that use the RunApp action and have had no problems in the past. I currently have five databases that have a button on a switchboard that runs a macro that uses the RunApp action to run a batch file that will get data from various places to populate my tables. The user then goes on to click other buttons for various reasons.

The following is the command line used to open one of my batch files:

\\bfe9058fp10\userdata\Accounting Operations\LOAN RECON\CLCS Loan Variances\PLC902D.bat

' \\bfe9058fp10 = the server

Until last week, this command worked flawlessly as it has for the past year and a half. Now, all of a sudden, I get...

"Microsoft Office Access can't invoke the application using the RunApp action. The path to the application is invalid, or a component of the application is missing. Check the path in Windows Explorer or File Manager."

Any insight into the reason that this is happening? It really has worked for the past almost 2 years without a hitch. I've had recommendations to convert to vb with the shell command. I've also been told that I need to pass in the path to the command prompt application and then the path to my batch file. Why would I need to do any of this when it has worked without it for so long?

Thank you,

Robert
Have you checked the path?

Windows key + R
Type in \\bfe9058fp10\userdata\Accounting Operations\LOAN RECON\CLCS Loan Variances\ and click OK.
Check to see if the file is there.
Aug 20 '07 #2

P: 5
Have you checked the path?

Windows key + R
Type in \\bfe9058fp10\userdata\Accounting Operations\LOAN RECON\CLCS Loan Variances\ and click OK.
Check to see if the file is there.
It's there. Thanks. I've been running it manually since the RunApp action stopped working. Actually the databases that I'm having problems with are sitting in the same folder as the batch files I'm trying to run.
Aug 22 '07 #3

Rabbit
Expert Mod 10K+
P: 12,392
Maybe it's because of the spaces. Try surrounding the path with quotes.
Aug 22 '07 #4

ADezii
Expert 5K+
P: 8,669
I've run into this issue and it started last week. I maintain numerous databases that use the RunApp action and have had no problems in the past. I currently have five databases that have a button on a switchboard that runs a macro that uses the RunApp action to run a batch file that will get data from various places to populate my tables. The user then goes on to click other buttons for various reasons.

The following is the command line used to open one of my batch files:

\\bfe9058fp10\userdata\Accounting Operations\LOAN RECON\CLCS Loan Variances\PLC902D.bat

' \\bfe9058fp10 = the server

Until last week, this command worked flawlessly as it has for the past year and a half. Now, all of a sudden, I get...

"Microsoft Office Access can't invoke the application using the RunApp action. The path to the application is invalid, or a component of the application is missing. Check the path in Windows Explorer or File Manager."

Any insight into the reason that this is happening? It really has worked for the past almost 2 years without a hitch. I've had recommendations to convert to vb with the shell command. I've also been told that I need to pass in the path to the command prompt application and then the path to my batch file. Why would I need to do any of this when it has worked without it for so long?

Thank you,

Robert
Assuming the Path is correct, spaces should not make a difference in the RunApp Action. Where any modifications made within the Batch File itself? If there where and it subsequently generated an Error, it may be passed back to the calling routine, in this case the Macro.
Aug 26 '07 #5

missinglinq
Expert 2.5K+
P: 3,532
Obviously, something has changed! Usually, when a routine has worked for an extended period of time without problems and suddenly bombs, without anything else changing, the first thing you think of is corruption. The manner of the problem, though, doesn't really feel like that to me.

I tend to agree with ADezii, that something further down the line is involved and the error is being reflected backward. Maybe a change to the batch file, as he suggested, or maybe even something has changed in the files the batch file is pulling from.

I suppose replacing the RunApp action with VBA and using the Shell() function is worth a try.

Welcome to TheScripts!

Linq ;0)>
Aug 26 '07 #6

P: 1
You can't run the RunApp action in a Visual Basic for Applications (VBA) module. The macro wasn't designed for it in 2007. You have to use the VBA Shell function instead. And be sure to separate the command/root function from the file location, unless they're in the same directory.
Mar 13 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.