If you want to quit the entire access application then i believe the code is:
Application.Quit
Its always advisible to throw up a message box to the user incase they have pressed the button by accident. So you'll need something like:
Code:
Private Sub YOURBUTTON_Click()
Dim x as Integer
x = MsgBox("Are you sure you want to quit?", 4, "Exit?")
'VbNo constant throws back #7
'VbYes constant throws back #6
If x = 7 Then
Exit Sub
Else
Application.Quit
'Or Me.Close
End If
End Sub
I forgot the wizards make embedded macros now. You can't have both, so I'd get rid of the embedded macro and put in code instead. That way, you can add whatever else you wanted.