Graham T
Registered User.
- Local time
- Today, 15:53
- Joined
- Mar 14, 2001
- Messages
- 300
On my switchboard, for the Quit application command button I have the following code
So the purpose is to ask the question, if any e-mails are unsent, "Do you want to send these now?"
If the user clicks no then the application should close down (application.quit) else exit the sub and return to the switchboard.
How do I take the users response to the question is the problem that I am having.
Any help apprieciated.
Graham
Code:
If DCount("[tblJobOutcomes]![lngJobOutcome]", "[tblJobOutcomes]", "[tblJobOutcomes]![ysnSentByMailToStaff]=0") = 0 Then
Application.Quit
ElseIf DCount("[tblJobOutcomes]![lngJobOutcome]", "[tblJobOutcomes]", "[tblJobOutcomes]![ysnSentByMailToStaff]=0") >= 1 Then
MsgBox "You have " & DCount("[tblJobOutcomes]![lngJobOutcome]", "[tblJobOutcomes]", "[tblJobOutcomes]![ysnSentByMailToStaff]=0") _
& " new job outcome e-mail(s) to send." & Chr(10) & Chr(10) & "Would you like to send these now?", vbQuestion + vbYesNo, "You Have Unsent E-Mails..."
So the purpose is to ask the question, if any e-mails are unsent, "Do you want to send these now?"
If the user clicks no then the application should close down (application.quit) else exit the sub and return to the switchboard.
How do I take the users response to the question is the problem that I am having.
Any help apprieciated.
Graham