If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to prevent form from closing
Hello everybody,
I use a modal popup form to enter data in a db on which there a 2 buttons "save and close" and "cancel". I'd like to prevent the from from closing through the "X" button on the top left corner with unwanted/incomplete data. Do do that I trap the use of these buttons in before update event so in the else case I put a warning msgbox (vbOKonly) and cancel = true to prevent any other event. So far so good. After this event an extra message of Access advises me that the record can't be saved and if I want to close anyway the form or not. I want to avoid this message and of course the closure of the form. Why cancel = true is not enough to do that and what else I could do? Thks in advance |
Thread Tools | |
Display Modes | |
|
|