Accessing public variables...

pdbowling

Registered User.
Local time
Today, 05:03
Joined
Feb 14, 2003
Messages
179
Hi everyone,
I've got
Dim Public varName as String

in the declarations section of a form.

How can I access this variable from the code in another form?

varName crashes and shows as empty...

Any clues?
pb
 
You have to reference the forms name and then the variable:

Forms![YourFormName].VariableName
 
Create a module and make "Property" procedures.

Then you don't have to know or care about form names.

(don't mean to insult any posters, but any other approach is dumb)

RichM
 

Users who are viewing this thread

Back
Top Bottom