Results 1 to 4 of 4

Thread: Control Array: Problem in Unloading

  1. #1
    Guest

    Post

    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.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    You can't do an unload from the Change, Click, or DropDown events of a ComboBox

    ------------------
    Marty

  3. #3
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Post

    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

  4. #4
    Guest

    Post

    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....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width