paasing a variable

S

simcon

I want to be able to set up a variable in the on click event on a box e.g.
vend_status = "I" and then in the on open event on a form test the value of
the variable.
tried STATIC,PUBLIC variables but form code can't see the variable.
regards Neil
 
D

Dirk Goldgar

simcon said:
I want to be able to set up a variable in the on click event on a box
e.g. vend_status = "I" and then in the on open event on a form test
the value of the variable.
tried STATIC,PUBLIC variables but form code can't see the variable.
regards Neil

Where did you declare the variable? You would have to have declared it
in a standard module, not in the first form's class module.
 
D

Dirk Goldgar

Dirk Goldgar said:
Where did you declare the variable? You would have to have declared
it in a standard module, not in the first form's class module.

Note: if you're opening form 2 from form 1 (where you set the
variable), you might pass the variable via OpenArgs, rather than using a
global variable.
 
Top