How to Prevent a User Closing A MS Access Form


The following MS Access tutorial shows you how you can prevent a user from closing a form by clicking on the standard close button (little x) on the top right corner of  the form:


1. With your form in design view click in the tools section of the “Design” tab and then click on the item called “Property Sheet

2. Ensure that the “Selection Type” box has the word “Form” selected

3. Select the “Format Tab

4. On the “Close Button” property select “No”

5. Save your changes and try to close the form.  It should not now be possible to close the form using the close button.

6. You could now create an exit button for your form using the button wizard or add the following VBA code to a function or procedure

DoCmd.Close acForm, “yourFormName”


Please feel free to contact us at for help or advice on any aspect of this tutorial or MS Access in general, we love feedback and are always happy to help.