How to access global variable EXPLICITLY

  • Thread starter Thread starter vikram.singh
  • Start date Start date
V

vikram.singh

Hi,
i have declared one global varibale named VAR1 in form module and
another defined in sub proecdure with the same name (VAR1) in the
same
form module . if i use VAR1 then local variable will be
accessed .......but if i wanna use the global variable explicitely in
the same procedure then how can i do that.

Regards,
Vikram
 
Give them different names. Some naming conventions specify variable names
should include a scope identifier:

gVar1 - Globla
mVar1 - Module
Var1 - Local

I don't use this myself, because I don't use global variables and only use
module level variables on a very limited basis.
 
You can qualify a variable with the name of the module
where it is declared:

a = module1.myvar
b = myform.myvar

But it's still not a good idea: change the name of one of the
variables.

(david)
 
Back
Top