Jump to content
BradF

How can I stop a form from being closed

Recommended Posts

I have an application with several forms. On one of them, if there are unsaved changes to a table, I want to display a message dialog box and intercept the close, allowing the user to save the changes first.  I am currently using a bitbtn as bkClose to exit the form.  I tried to put code in the on click event of the button but it was ignored.

Share this post


Link to post
Posted (edited)

Form's OnCloseQuery event CanClose parameter

Edited by Attila Kovacs

Share this post


Link to post

I will try that.

Share this post


Link to post

Thanks. That is exactly what I wanted.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×