Hi All,
I have a form in which i have few mandatory fields. Wheneve the user tries to save, i check for these fields and alert them, if thet are empty. I have a CLOSE button in my form and whenever the user clicks the CLOSE button, i ask the user whether he wants to save before closing the form.
On the Form_Unload event, i check whether there are any new changes and if yes, i pompt the user for a save. But if they have not filled any of the mandatory fields and if they press the close button, it alerts asking for a value, but immediately after the alert it closes the form, as it is a FORM_UNLOAD event.
Is there any way to stop unloading the form, if i alert them about a mandatory field. Please note that since the code has grown huge shifting the MANDATORY check block from FORM_UNLOAD event is quite tough. So it would be of much help if you can suggest me on how to stop the FORM_UNLOAD???
Thanks a ton.