[AccessD] Ambiguous Name

Stuart McLachlan stuart at lexacorp.com.pg
Wed Sep 21 16:56:26 CDT 2011


You and I obviously have  a different definition of "Global".  :-)

Changing Private to Public changes everything.

If the variable is Public, it has global scope i.e. it is  a Global variable.

If the variable is Private, it has local scope just the same way in instance variable does inside 
an object.    All you are doing there is  using a standard module to replicate part of the 
functionality  of a class object 

Why not just create a Globals object instead and get full class functionality?
 
-- 
Stuart


On 21 Sep 2011 at 9:06, Jim Dettman wrote:

> 
> Stuart,
> 
>   I don't agree.  It's a global variable.   It's scope has been
>   limited to
> module level yes, but it's still global because more then one
> procedure can access it. 
> 
>   More importantly is the fact that once the module is loaded, the
>   variable
> exists until the app terminates.  That is quit different from a local
> variable which is created/destroyed when a procedure executes and then
> terminates.
> 
>   But if it floats your boat, make "private" "public" and nothing has
>   really
> changed in terms of the discussion.
> 
> Jim.
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart
> McLachlan Sent: Tuesday, September 20, 2011 05:37 PM To: Access
> Developers discussion and problem solving Subject: Re: [AccessD]
> Ambiguous Name
> 
> In that case, it's NOT Global. It's Local to the module.
> 
> -- 
> Stuart
> On 20 Sep 2011 at 12:41, Jim Dettman wrote:
> 
> > Steve,
> > 
> >   I should have said that this code exists in a standard module.
> >   objcurDB
> > has been declared private to limit the scope to the module, but it's
> > still a global variable, which could be accessed by any procedure in
> > that module.
> > 
> > Jim.
> > 
> 
> 
> -- 
> 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