Public Variables

  • Thread starter Thread starter Mike J
  • Start date Start date
M

Mike J

In one form, in the General section, I want a boolean
variable and a string variable to be pulbic throughout the
project. So I use: Public var1 as boolean
Public var2 as string
I then assign the variables with the values in a table.

The variables are set fine in the first form, but var2 is
empty when trying to use it in the 2nd form. var1 is ok
in both. Any ideas?
 
The scope of variables is dependent on where and how
those variables are declared. As you have described it,
the variables that you have declared in one form should
not be available from any other module or form.

If you want truly global or public variables try defining
those variables in a Module as Public.
 
Back
Top