Put a break in the querry unload and see if it stops there, or else you should unload the form with unload command