Public Variables

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?
 
B

Byron

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top