On my autoexec form I have a button on it that quits access or the database if you will. I use the following code to do so:
Private Sub quit1_Click()
On Error GoTo Err_quit1_Click
dim holder as string
holder = msgbox("Are You Sure You Want To Quit?",vbYesNo)
if vbYes then Docmd.Quit
Else
end If
Exit_quit1_Click:
Exit Sub
Err_quit1_Click:
MsgBox Err.Description
Resume Exit_quit1_Click
End Sub
What Am I doing wrong
Thanks Joel
Private Sub quit1_Click()
On Error GoTo Err_quit1_Click
dim holder as string
holder = msgbox("Are You Sure You Want To Quit?",vbYesNo)
if vbYes then Docmd.Quit
Else
end If
Exit_quit1_Click:
Exit Sub
Err_quit1_Click:
MsgBox Err.Description
Resume Exit_quit1_Click
End Sub
What Am I doing wrong
Thanks Joel