darrellread
asked on
ms access
how do you get a message box on the stop button to ask you if you want to quit, and then not quit if you click on no?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you don't get it to work, tell, so i can help implementate.
ASKER
I have added this code to the button, but it comes up with a help button on the message box, i have no help file, and don't plan to have one so i do not need this in the text box. Below is a copy of the code i have used...
Private Sub Command51_Click()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Are you sure you want to quit?"
Style = vbYesNo ' Define buttons.
Title = "SEAS Database" ' Define title.
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then DoCmd.Quit
End Sub
I would also like to know what the Ctxt does.
Private Sub Command51_Click()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Are you sure you want to quit?"
Style = vbYesNo ' Define buttons.
Title = "SEAS Database" ' Define title.
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then DoCmd.Quit
End Sub
I would also like to know what the Ctxt does.
Msgbox consists of the following components:
MsgBox prompt,vbYesNo,title,helpf ile,contex t
context = optional, a numeric expression for the help context number.
When not using a help file, don't use context as well.
Greets,
Justus
MsgBox prompt,vbYesNo,title,helpf
context = optional, a numeric expression for the help context number.
When not using a help file, don't use context as well.
Greets,
Justus
ASKER
cheers this works
ok :)
ASKER