[AccessD] OpenArggggggghhhhhhsssss

William Benson (VBACreations.Com) vbacreations at gmail.com
Thu Aug 11 13:22:24 CDT 2011


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




More information about the AccessD mailing list