Results 1 to 4 of 4

Thread: Canceling Form Unload ***Resolved***

Threaded View

  1. #1

    Thread Starter
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Resolved Canceling Form Unload ***Resolved***

    Would I use the following code to prevent a form from unloading when the user click the red 'X' in the upper right hand corner of the form:

    VB Code:
    1. Private Sub Form_Unload(Cancel As Integer)
    2.      Cancel = True
    3.      Me.Hide
    4. End Sub

    Will this do the trick or should I use the Query_Unload Event?


    Thanks
    Last edited by Mark Gambo; Mar 17th, 2005 at 07:16 PM.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


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