I have designed a database and have used the following code to disable the standard Microsoft close button. I want my users to have to click on a Quit button on the switchboard:
[CODE=vb]Private Sub Form_Unload(Can cel As Integer)
Dim LResponse As Integer
LResponse = MsgBox("Please Use Quit Button on Main Menu", vbOKOnly)
If LResponse = vbOK Then
Cancel = True
End If
End Sub
[/CODE]
They get a pop-up reminder that they have to press OK on - which works well - nothing closes. The problem is that they then get the same reminder when they actually press the Quit button - when the press OK it then closes the database, but I want it to close without having to have this pop-up on the Quit Click.
Anyone got any code for this?
Thanks!
EAC
[CODE=vb]Private Sub Form_Unload(Can cel As Integer)
Dim LResponse As Integer
LResponse = MsgBox("Please Use Quit Button on Main Menu", vbOKOnly)
If LResponse = vbOK Then
Cancel = True
End If
End Sub
[/CODE]
They get a pop-up reminder that they have to press OK on - which works well - nothing closes. The problem is that they then get the same reminder when they actually press the Quit button - when the press OK it then closes the database, but I want it to close without having to have this pop-up on the Quit Click.
Anyone got any code for this?
Thanks!
EAC
Comment