Public variable

  • Thread starter Thread starter Denisio
  • Start date Start date
D

Denisio

Hi,
Sorry for my bad english.

I declare a public variable in a formcode : Public VAR as integer
I never can use it in an other formcode... unknown variable
Probably something wrong. How to spell this public variable ?
Thanks for your help.
 
To reference a public variable declared in a different form, you need to
include the form name in the reference

E.g. if Form1 has the declaration
Public var1 As Integer

To refere to it in any other form then use
localVariable = Form1.var1

To declare a global variable then create a new module and place the
declaration in there.

Graeme.
 
Thank you Graeme
It works well.
I never found exemples about it in Microsoft Access helps !
Denis
 
Back
Top