[AccessD] Retrieve command line arguments

Dan Waters dwaters at usinternet.com
Fri Jan 25 13:29:40 CST 2008


Rocky,

One of the reasons I went with the small MorningReminders.mdb was that the
main database needs a user name and password to log in.  In
MorningReminders.mdb those are stored in a parameters table and passed to
the main database with the Shell function.

Does your system require a user name and password?  If so, how will you be
able to open your database from a Scheduled Task?

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Friday, January 25, 2008 11:45 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Retrieve command line arguments

'If I understand your request...you want 1 thing to happen when a user opens
the db...and another if it is opened by a scheduler?"

Exactly.  But Gustav's solution of using the /cmd switch and then checking
for the presence of an argument using Command() works real well and was
simple to implement.  

Thanks and regards,

Rocky



 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Friday, January 25, 2008 9:36 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Retrieve command line arguments


Rocky,

If I understand your request...you want 1 thing to happen when a user opens
the db...and another if it is opened by a scheduler?

I do this for some of my local apps.   When the app opens the load form uses
api to find windows user name...then determines by list if this is a manager
or regular user...then launches correct form.

Could you do the same to determine if a user whether to launch your
function?

Thanks,

Mark A. Matte






> From: rockysmolin at bchacc.com
> To: accessd at databaseadvisors.com
> Date: Fri, 25 Jan 2008 07:58:54 -0800
> Subject: Re: [AccessD] Retrieve command line arguments
>
> Max:
>
> That would work except that the function I need to run is embedded in 
> the application and the client does not want a separate mdb or mde 
> just to run that function - has to be in embedded in the whole 
> application. Users - gotta love 'em.
>
> Rocky
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
> Sent: Friday, January 25, 2008 7:54 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Retrieve command line arguments
>
> Rocky,
> We do this every night.
> Just call the app from Windows Scheduler.
> We use the autoexec macro to call a function which runs whatever and 
> then closes down.
>
> You could have the Startup Options set to a form which immediately 
> calls the function also and then closes down.
>
> You don't need any command line parameters.
>
> Max
> Ps. If you wanted to lock the app down, make it a MDE instead of a MDB 
> + password protection of the database.
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky 
> Smolin at Beach Access Software
> Sent: Friday, January 25, 2008 3:34 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Retrieve command line arguments
>
> Gary:
>
> That would be my preferred design. But the client wants it this way.
>
> Rocky
>
>
>
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos
> Sent: Friday, January 25, 2008 7:22 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Retrieve command line arguments
>
> Does it HAVE TO be in the same database? How about a seperate database 
> that links to the same tables in the original and then when you open 
> that "Automail" database it runs and sends the reports and then exits.
>
> GK
>
> On 1/25/08, Rocky Smolin at Beach Access Software
> wrote:
>>
>> Dear List:
>>
>> I want to run a function in an application (emails out reports) 
>> automatically. I see that one way to do this is to use the /x switch 
>> on startup to run a macro which will run a module which could have 
>> Application.Quit at the end of it. But I can't seem to get this to work.
>> And besides, I'm under the impression that macros are not PC anymore.
>>
>> Anyway, if I can 'see' the startup switches on the command line that 
>> calls access and starts the app, I suppose I could intercept al the 
>> startup housekeeping, run the reports, send the emails and exit.
>>
>> Is there a way to see what the command was that started an app , IOW 
>> retrieve the command line arguments ? Or is there a better way to do
> this?
>>
>>
>> The automated email sender has to be part of the larger app - 
>> originally it was split off for development purposes, but now, it's 
>> part of the design that it should be integrated into the application.
>>
>> MTIA
>>
>> Rocky
>>
>>
>>
>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
>
>
> --
> Gary Kjos
> garykjos at gmail.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.11/1242 - Release Date: 
> 1/24/2008
> 8:32 PM
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.11/1242 - Release Date: 
> 1/24/2008
> 8:32 PM
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.11/1242 - Release Date: 1/24/2008
8:32 PM
 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list