Hide 'X' close option or force data save and backup on exit.

Robert M

Registered User.
Local time
Today, 09:45
Joined
Jun 25, 2009
Messages
153
The user I have keeps getting out of the program I developed by 'X'ing out. This closes the program without making abackup. Is there any way of hiding this option so that the user must press the close button in Access or is there a way to automaticaly save and backup the data if the user 'X's out?

Thank you for your help in this matter.

Robert M
 
Maybe these two "tricks" would work:

1. Set the Controlbox on your Main Form to 'No' and create a custom exit button with your backup code behind it.
2. Put the following code behind the Unload event of the main form to stop the user from exiting Access itself.

Private Sub Form_Unload(Cancel As Integer)
Cancel = True
End Sub
 
Thanks Freshman, the code works perfectly. Will put a msgbox to inform the user that they must exit via the proper channels.

Thank you again for your help

Robert M
 

Users who are viewing this thread

Back
Top Bottom