Hi all,
I want to pass the value that is chosen in a combobox (serving as a
lookup) to a second form and put it in a label caption.
I have publicly declared (public order as string) the chosen value,
but when i activate the second form the variable seems to change to
'nothing'.
Anybody got any ideas how to solve this?
Thanks in advance.
Sybolt
You need to make your public variable 'global' in scope so it can be
accessed anywhere in your project. I use a standard module named
'm_OpenClose' where I put all startup/shutdown code and declare/define
all global variables/constants/declares.
In this startup module...
Public gsOrder As String
...and in your 1st form...
gsOrder = ComboBox1.Text
...so it's available thereafter to your 2nd form.
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion