Error when closing form

jcaptchaos2

Well-known Member
Joined
Sep 24, 2002
Messages
1,032
Office Version
  1. 365
Platform
  1. Windows
I have a form that opens and it askes you to put some information in, if you don't put any information in and close it it gives a "The openForm action was canceled". "You used a method of the DoCmd object to carry out an action in Visual Basic but then clicked cancel in the dialog box. For example, you used the Close method to close a changed form, then clicked cancel in the dialog box that asks if you want to save the changes you made to the form" Is there a way to make it so you don't get that warning?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Is there an on close VBA event for this form? If so then I think you will find your problem there. If not, is this form closed by cliking a custom button or the little "x" at the top right of the screen?

Andrew
 
Upvote 0
Andrew, thanks for responding. There is no close event on the form and it is closed by clicking the red X in the corner.
 
Upvote 0
Actually what is causing the error is the message box that opens when you click the button on the form. If you try to close that message box with out entering any information you get that error when clicking the red X
 
Upvote 0
Hi

It sounds like there is something going on......but I can't visualise what that is. Do you want to send me a zipped copy of your database?

Andrew
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,205
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top