Hi Philip,
I'm not sure what the "white X on red square" means, but you can use code
similar to this behind a command button:
Private Sub cmdQuit_Click()
On Error GoTo ProcError
Dim intResponse As Integer
intResponse = MsgBox("Do you wish to quit this application?", _
vbQuestion + vbYesNo, "Please Confirm Intent to Quit...")
If intResponse = vbYes Then
DoCmd.Quit
End If
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in cmdQuit_Click event procedure..."
Resume ExitProc
End Sub
Tom Wickerath, Microsoft Access MVP
http://www.access.qbuilt.com/html/ex...tributors.htmlReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9626Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9626 http://www.access.qbuilt.com/html/search.html
__________________________________________
"Philip Leduc" wrote:
> How to I connect an event to the close Access button (white X on red square)
> ..
> The idea is when the user clicks this he will get a warning with the option
> to cancel before Access closes out completely