Variables and passing between forms.

  • Thread starter Thread starter David Mc
  • Start date Start date
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
 
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..
 
(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).
 
Back
Top