Selecting Listbox Items on Hidden Form

MikeAngelastro

Registered User.
Local time
Today, 04:51
Joined
Mar 3, 2000
Messages
254
Hi again,

I am selecting items in a listbox on a hidden form and I know that they are in fact selected. But I go to read the values of the selected items, I get null. When I actually select items on the form when it is not hidden, the values of the selected items are not null. What else do I have to do besides selecting items in code to be able to read the values.

Thanks,

Mike
 
Hey Mike!

I am not sure if I can provide a direct answer, but is it possible to store the selected values prior to the form becoming hidden? Perhaps in a global array?


Good luck!

Big Jim
 
Thanks BigSlimSlade!

I took another look at the form's design and found that the row source of the list box was not set until the list box becomes visible. This never happens if the form is loaded in hidden mode. So there was never any real items to select. As result, even though an item was selected, it had no data to give me. So I copied the line of code that sets the list box's row source into the form's open event and voila!

Thanks any way.

Mike
 

Users who are viewing this thread

Back
Top Bottom