Results 1 to 2 of 2

Thread: [RESOLVED] Cancel closing of a form.

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Location
    Coventry, England.
    Posts
    58

    Resolved [RESOLVED] Cancel closing of a form.

    Hello,

    I'm trying to trap altered state of records in the OnClosing event of a form to see if they want to save changes before they close the form.
    I want the options to be Yes/No/Cancel so that Yes=save changes, No=ignore changes and close the form, Cancel=don't close just yet.
    However I just can't seem to Cancel the closing of the form - I've tried returning and exiting from the event routine but neither seem to work.

    Anybody know how it's done?

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2006
    Location
    Coventry, England.
    Posts
    58

    Re: [RESOLVED] Cancel closing of a form.

    Turns out you can simply set

    e.cancel = true

    inside the event to stop it going further and cancel the close.

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