-
I am trying to load a control array of a text box, in a combo box click event. The next time the user click on the other item of combo box, I want to unload the control array and freshly load again. But its somehow not working. When I am trying to unload the text boxes added at run time(in control array), I am getting a run time error, saying, "UNABLE TO UNLOAD IN THIS CONTEXT". I am curious to know why is this happening.
I went through the help for that run time error, it says , there should be some 'Unload' statement, in other events, thats preventing me to unload. But I do not find any unload statement in any of the events of that particular combo box.
Could anyone tell me why is it happening?
Thanks...
Rashmi.
-
You can't do an unload from the Change, Click, or DropDown events of a ComboBox
------------------
Marty
-
A workaround is to put the unloading code in a timer event. Disable the timer and set the interval to a small value. In the click event from the combobox, enable the timer, and disable it again in the last line of code of the timer event.
HTH
-
Hi Marty
Thanks a lot, That was good information. I had come to same conclusion, but wanted confirmation from someone who worked on it.
Hi Farnc,
Thaks to u too. That was a great idea. It works perfectly alright. I am happy I could avoid another command click. Thanks again....