You must prompt your question and then make a decision with an if... then...
Something like this:
if msgbox("Are you sure you want to exit",vbyesno) = vbyes then
docmd.close form,formname 'or whatever you want to close
else
exit sub ' or whatever you want to do
end if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.