Global Variables

majette97

Registered User.
Local time
Today, 07:55
Joined
Apr 26, 2001
Messages
23
Can someone assist in showing a sample of code of how to setup a Global Variable with a value that will be used on multiple forms within the same database.

Thanks for any assistance.
 
create a new module or use an exisitng module and use the following syntax in the declaration section...

Public varname as vartype

Now you can access this anywhere at anytime.. Just so you know, in order to get the value of this variable into a form somewhere, you probably will have to create a simple function to return the value of the variable.

function fGetVarName() as vartype

fGetVarName=varname

end function

Hope that helps...

Doug
 

Users who are viewing this thread

Back
Top Bottom