Stuart McLachlan
stuart at lexacorp.com.pg
Sun Jun 26 13:44:10 CDT 2005
On 26 Jun 2005 at 11:23, Arthur Fuller wrote: > I'm having a senior moment here today, folks. I cannot remember how to run > an external app from within Access. In this case it's a batch file. > Shell() > Followup question.... Is there a way to specify an exit level (i.e. > errorlevel) when exiting an Access app? Suppose for example that Access is > being invoked from a batch file, and that I want to set an errorlevel of 1 > or 0, then take action on this value in the batch file. > AFAIK, you can't - the errorlevel would need to be returned by Access itself, not your app. > I.e. > > MyBatch.cmd: > 'run a simple Access app > MySimpleApp > 'test its exit value > If errorlevel = 1 goto One > If errorlevel = 0 goto Done > You could use a sentinel file. Create a small file with a filename which indicates the level you want to return and use "if exist filename" -- Stuart