using GLOBAL variable?

pungentSapling

NeedHotSauce?
Local time
Today, 14:31
Joined
Apr 4, 2002
Messages
115
I want to have a form"switchboard" that determines what "mode" another form will load in.
So I need a flag variable that will determine whether the user clicked the VIEW ONLY button or the ADD button.
In the past I have declared this variable as Global in a seperate module. example "dim addMode as boolean" And then assigned true or false to the variable depending on which button was clicked.
Then I call the appropriate mode on form load based on the value of the variable.
if addMode = false then
call viewOnly........
I just want to know if there is a better way to do this. Do I need the seperate module with the Global variable or is there a better way?

confused?
thanks
p
 
Yes, there is a better way.

See Access help for "Property" procedures.

RichM
 
You can declare variable in any module I think. Access seems to find them. I use Public YourVariable as Variant.
The variant may change depending on the type - variant,string,integer, etc
 

Users who are viewing this thread

Back
Top Bottom