How to write macro to stop a form from closing and exiting ACCESS. I have a message box that asks "do you want to save and exit now?. There are yes, no and cancel boxes and when any of the boxes is clicked, the form closes and exits ACCESS. I would like the form to close only when yes is clicked.