Variables and passing between forms.

D

David Mc

I have been trying to pass variables such as integer and
strings between two forms, when i open the form the
variables do not contain data. how is the best way to
declare them.

thanks

david
 
B

Bruce M. Thompson

I have been trying to pass variables such as integer and
strings between two forms, when i open the form the
variables do not contain data. how is the best way to
declare them.

You need to declare your variables as Global in a standard module (not a
module behind a form or report):

Global strMyString As String

Of course, any variable will contain only the default value until it has
been assigned a value, integer types will contain a zero, string types will
contain a null string, variants will be null, etc..
 
V

Van T. Dinh

(answered in "formscoding")

Please do not multipost.

If you think it is necessary for your question to appear in more than one
newsgroup (it rarely is if you describe precisely), use cross-posting
(sending ONE post with up to 3 relevant newsgroup addresses on the post).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top