>I tried putting both of those commands into the form's queryunload and neither works. If the search object is showing, my form will not close until I close the search object.
>
>If it helps you to understand my situation, the search object is a toolbar with a textbox and a close button in it. My form will not close unless I select the close button on the toolbar first.
In that case,
this.removeobject("oSearch")