Jim Lawrence
accessd at shaw.ca
Sun Jun 26 15:12:21 CDT 2005
Hi Arthur: The part you forgot was the 'choice' dos command option. Here is piece of sample code from MS help. @echo off cls echo. echo A Microsoft Editor echo B Microsoft Anti-Virus echo C Microsoft Backup echo. choice /c:abc Choose an option if errorlevel 3 goto MSBackup if errorlevel 2 goto Msav if errorlevel 1 goto Edit :Edit edit goto End :Msav msav goto End :Msbackup msbackup goto End :End HTH Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, June 26, 2005 8:23 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Run External App from within Access 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. 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. I.e. MyBatch.cmd: 'run a simple Access app MySimpleApp 'test its exit value If errorlevel = 1 goto One If errorlevel = 0 goto Done :One Rem Do something cool :Done Rem Do nothing at all TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com