Need to post a message and conditional formulas On Close

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
Well, Im not sure if I should be using On Close, that's the question.

I want to conditional format certain fields and have message pop-up if the user tries to close the form and there are fields they should have completed.

1) do I use the On Close Event?

2) on the Pop-up Message, I want the user to have the option to close the form anyway or to return to the form and compete the information.

So the question for "2" is how do I stop the Close Event if they click a button "Return"?

I know how to do the conditional formulas, and know how to create a pop-up form, I just done know how to make the pop-up stop the Closing of the form if the user selects not to close it.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Typically, you would use the BeforeUpdate event of the Form to validate record entries before the record is added.
However, you may be able to avoid the use of VBA code entirely.
If these fields are bound to a Table, and they are required for all records, just make them required fields at the Table level (Required property).
If you do that, they will not be able to add any new records without populating those fields (without any coding required).
 
Upvote 0
Good point.

Required is a loose term in this instance. They are times when that data is not available at the time they enter the data. So there are instances where it has to be blank for a period of time. But I want to que the user if they do have it but might not have entered it.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

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