[AccessD] Retrieve command line arguments

Max Wanadoo max.wanadoo at gmail.com
Sun Jan 27 04:24:37 CST 2008


In my Goodie-Bag.
Thanks Jim

Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman
Sent: Friday, January 25, 2008 6:30 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Retrieve command line arguments

Rocky,

 Below is code to grab the value you pass in with /cmd on the command line.

 Call GetCommandLine() in your startup form.  You can optionally pass an
argument on the number of parameters you expect to see.  If you don't, it
assumes up to 10.  The procedure assumes a space or tab delimits an argument
unless it's within quotes.

 Once you've done that, then anytime in the app call GetCommandLineArg()
with the argument number to get it's value.

 Here's an example of that:

          ' Main processing loop for app
          ' Check command line passed:
          ' P1 - Job/Customer:
          '      'ALL' - Process all defined jobs (Customers).
etc




More information about the AccessD mailing list