![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How do I close a message box from code? here is my current code: Option Compare Database Dim Response As Integer Public Function Login_Canceled() MsgBox "Are you sure you would like to cancel?", vbYesNo + vbApplicationModal + vbInformation + vbDefaultButton2, "Program Message" If Response = Yes Then Quit If Response = No Then End End Function Can anyone help me? Thanks, Mark S. |
#3
| |||
| |||
|
|
markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>... How do I close a message box from code? here is my current code: Option Compare Database Dim Response As Integer Public Function Login_Canceled() MsgBox "Are you sure you would like to cancel?", vbYesNo + vbApplicationModal + vbInformation + vbDefaultButton2, "Program Message" If Response = Yes Then Quit If Response = No Then End End Function Can anyone help me? Thanks, Mark S. Hello Mark, Perhaps you could change your Yes to vbYes and your No to vbNo. Regards, Ray |
#4
| |||
| |||
|
|
markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>... How do I close a message box from code? here is my current code: Option Compare Database Dim Response As Integer Public Function Login_Canceled() MsgBox "Are you sure you would like to cancel?", vbYesNo + vbApplicationModal + vbInformation + vbDefaultButton2, "Program Message" If Response = Yes Then Quit If Response = No Then End End Function Can anyone help me? Thanks, Mark S. Hello Mark, Perhaps you could change your Yes to vbYes and your No to vbNo. Regards, Ray |
#5
| |||
| |||
|
|
How do I close a message box from code? here is my current code: Option Compare Database Dim Response As Integer Public Function Login_Canceled() MsgBox "Are you sure you would like to cancel?", vbYesNo + vbApplicationModal + vbInformation + vbDefaultButton2, "Program Message" If Response = Yes Then Quit If Response = No Then End End Function Can anyone help me? Thanks, Mark S. |
#6
| |||
| |||
|
|
markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>... How do I close a message box from code? here is my current code: Option Compare Database Dim Response As Integer Public Function Login_Canceled() MsgBox "Are you sure you would like to cancel?", vbYesNo + vbApplicationModal + vbInformation + vbDefaultButton2, "Program Message" If Response = Yes Then Quit If Response = No Then End End Function Can anyone help me? Thanks, Mark S. Hello again. As for your first question, I'm not sure. I'll have to look into it. The one question I do have is, why do you need code to run the hyperlink as compared to just selecting it with the mouse when that field data is displayed? Concerning the second question: Perhaps you need to add a bit more code. If Response = vbYes Then DoCmd.Quit Else Exit Sub End If Hope this directs you in the right way. Regards, Ray |
#7
| |||
| |||
|
|
How do I close a message box from code? here is my current code: Option Compare Database Dim Response As Integer Public Function Login_Canceled() MsgBox "Are you sure you would like to cancel?", vbYesNo + vbApplicationModal + vbInformation + vbDefaultButton2, "Program Message" If Response = Yes Then Quit If Response = No Then End End Function Can anyone help me? Thanks, Mark S. |
![]() |
| Thread Tools | |
| Display Modes | |
| |