There is something I have been trying to figure out for quite sometime that could solve several problems I am having with my database. My question is, Is there anyway to prevent a form from closing when the 'X' button is pressed. I have code on the Before_Update() event of the form that 1. checks if the employee num that was entered was a valid employee num and 2. checks if a couple of fields have been left null. The code works and the message is displayed, however, when the user clicks ok on the error message another message comes up and says "The info can not be saved, would you still like to close the form?" If the user clicks yes, the form closes and the record is not saved (just as it says in the error message). This is causing problems within the company. Is there anyway to absolutely not allow the form to close using the 'X' until all the correct data is entered? I have used Cancel=True in the code, does not work. I have tried taking the 'X' off the form but then users just use the 'X' that closes Microsoft Access all together. I am stuck here and in need of a solution, I am just hoping one exists. Thank you in advance.
Laura
Laura