[AccessD] OpenArggggggghhhhhhsssss

jwcolby jwcolby at colbyconsulting.com
Thu Aug 11 14:11:05 CDT 2011


I actually built a class to deal with openargs.  It loads the openargs and parses them, then makes 
them available for other code in a method of the OpenArgs class.

John W. Colby
www.ColbyConsulting.com

On 8/11/2011 2:57 PM, Heenan, Lambert wrote:
> IMHO 'when Access gets weird it is time to decompile the application."
>
> OpenArgs should never change unless you code does so explicitly.
>
> For example
>
> docmd.OpenForm "Form1",openargs:="Open Args"
> On Open: Open Args
> On Load: Open Args
> On Unload: Open Args
> On Close: Open Args
>
> Where each event handler Just has Debug.Print OpenArgs statements.
>
> Lambert
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com)
> Sent: Thursday, August 11, 2011 2:22 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] OpenArggggggghhhhhhsssss
>
> I can do that John.
>
> OnOpen fires before OnLoad right?
>
> By the way, this is sorta related ... when conrols have a rowsource -- or maybe a controlsource, not sure -- that is no longer valid because it doesn't exist... Access will often give an annoying message. I am not saying an inappropriate message, just an annoying one. Even though I sometimes do things in the Open event to fix the problem. Is there ANYTHING short of pre-opening a form in design view, testing object rowsources and controlsources for validity, and fixing "offline", before opening the form
> -- that will be the right time to make these tweaks and fixes?
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Thursday, August 11, 2011 1:17 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] OpenArggggggghhhhhhsssss
>
> Try moving the string assignment to OnOpen.  OnLoad is the point when eh form loads and is really before anything much is happening on the form.
>
> John W. Colby
> www.ColbyConsulting.com
>
> On 8/11/2011 12:32 PM, William Benson (VBACreations.Com) wrote:
>>
>> I am sending a nonempty string to openargs but when the form is
>> closing I call a subprocedure on the form which is closing -- and when
>> that
> procedure
>> refers to OpenArgs, it is frequently null for reasons which I cannot
>> understand....? So I tried assigning the openargs to a module level
>> string variable instead, on _Load. I saw that the OpenArgs was null in
>> that assignment statement, throwing an error. So I checked the call
>> stack, went to the line of code which was opening the form, and saw
>> that it was fine - the strOpenArgs variable I was passing as the value
>> for the OpenArgs argument was a populated string. Anyone seen this?
>>
>> My workaround is to give up on OpenArgs and resort to a global string
>> variable.
>>
>> Thanks
>>
> --
> 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
>



More information about the AccessD mailing list