Thanks Alex.
Where about should I be adding that additional code? At the beginning of the
original code or.....? Do I need to delete anything from the original code?
Hi Neil,
just wrap the
if msgbox....
end if
around the code you want to run under that condition.
e.g
Private Sub QuitApplication_Click()
On Error GoTo Err_QuitApplication_Click
if Msgbox("Are you sure you want to
exit?",vbyesno+vbquestion,"Confirmation!")=vbyes then
DoCmd.Quit
end if
Exit_QuitApplication_Click:
Exit Sub
Err_QuitApplication_Click:
MsgBox Err.Description
Resume Exit_QuitApplication_Click
End Sub
Does that answer your question?
you may want to try either of these as they may save you being prompted on
other issues when closing.
DoCmd.Quit acQuitSaveAll
DoCmd.Quit acQuitSaveNone

Signature
Regards
Alex White MCDBA MCSE
http://www.intralan.co.uk
> Thanks Alex.
>
[quoted text clipped - 31 lines]
>>>
>>> Anybody able to edit my code for me pretty please with jelly tots?
Neil Greenough - 04 May 2005 13:40 GMT
Alex,
It works a treat! Thanks!
Neil
> Hi Neil,
>
[quoted text clipped - 67 lines]
>>>>
>>>> Anybody able to edit my code for me pretty please with jelly tots?