S
Steve Sullivan
I lose all of the contents of global variables (variables declared as Public
in code modules) when the VBA-generated form I have created opens.
I needed a form in my Access application that was populated with labels and
checkboxes based on the contents of columns from two separate tables.
Because these contents can change, I could not create the form using the form
designer or wizard; instead, I wrote the VBA code to create the form and
populate it with the desired controls. The form also contains the VBA code
to run global procedures on certain events. The problem is that when the
form is activated, all global variables are "empty". Even when I close the
form, the global variables have no value assigned.
In expermentation, I found that I could generate the form and open it up
and, just before releasing control to the form, list out the contents of
global variables. However, as soon as the form-creating procedure ends
(releasing control to the form itself), none of the global variables are
valid anymore.
Is anyone familiar with this problem?
--
Steve Sullivan
May the road rise up to meet you. May the wind always be at your back. May
the sun shine warm upon your face … and … may God hold you in the palm of His
hand.
in code modules) when the VBA-generated form I have created opens.
I needed a form in my Access application that was populated with labels and
checkboxes based on the contents of columns from two separate tables.
Because these contents can change, I could not create the form using the form
designer or wizard; instead, I wrote the VBA code to create the form and
populate it with the desired controls. The form also contains the VBA code
to run global procedures on certain events. The problem is that when the
form is activated, all global variables are "empty". Even when I close the
form, the global variables have no value assigned.
In expermentation, I found that I could generate the form and open it up
and, just before releasing control to the form, list out the contents of
global variables. However, as soon as the form-creating procedure ends
(releasing control to the form itself), none of the global variables are
valid anymore.
Is anyone familiar with this problem?
--
Steve Sullivan
May the road rise up to meet you. May the wind always be at your back. May
the sun shine warm upon your face … and … may God hold you in the palm of His
hand.