The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
The only problem is that once you press the exit database button it closes it straight away!
I want to create a nice little message box to ask whether you are sure you want to quit, I havn't got a clue howto do this and Access help is a pile of crap!
It's got to be an 'OK' or 'Cancel' box which is '1' or vbOKCancel...
Can someone either tell me how to assign a message box like that to a button or just upload a basic form with one button that does what I want so that I can see how it works...
I'm sure I'll find out somehow someday but I know someone here will be able to help me better and prevent me from ~buggering~ up my database... again...
Thanks!
clicked = MsgBox("Do you want to quit?", vbYesNo + vbExclamation, "Confirm")
If clicked = vbYes Then
MsgBox ("You clicked yes")
end
Else
MsgBox ("You clicked no")
End If
Private Sub Exit_database_Click()
On Error GoTo Err_Exit_database_Click
DoCmd.Quit
Exit_Exit_database_Click:
Exit Sub
Err_Exit_database_Click:
MsgBox "Help!"
Resume Exit_Exit_database_Click
End Sub
The only problem is that once you press the exit database button it closes it straight away!
I want to create a nice little message box to ask whether you are sure you want to quit, I havn't got a clue howto do this and Access help is a pile of crap!
It's got to be an 'OK' or 'Cancel' box which is '1' or vbOKCancel...
Can someone either tell me how to assign a message box like that to a button or just upload a basic form with one button that does what I want so that I can see how it works...
I'm sure I'll find out somehow someday but I know someone here will be able to help me better and prevent me from ~buggering~ up my database... again...
Thanks!