saigonvietnam
Programmer
Hi All, I'm trying to send email with the default message through a form using Access 2003. User will choose whether or not to preview the message before seding. If the user choose to send w/o previewing, the default message will be sent OK. However, if the user choose to preview the message first before sending, the email will be opened for editing but the default message is gone.
Would anyone know what I have done wrong. Here is the code:
Private Sub cmdSubmit_Click()
On Error GoTo Err_Mail_Cancel
Dim intSeeOutlook As Integer
Dim bOption As Boolean
intSeeOutlook = MsgBox("Preview e-mail message?", _
vbYesNo, Me.cboCaseName & Me.Caption)
If intSeeOutlook = vbNo Then
bOption = False
Else
bOption = True
End If
DoCmd.SendObject acSendNoObject, , , Me.txtAttorneyEmail, , , _
Me.cboCaseName, "This will be the default message", bOption
DoCmd.GoToRecord , , acNewRec
Exit_cmdSubmit_Click:
Exit Sub
Err_Mail_Cancel:
Me.Undo
MsgBox ("Your Mail has been canceled!")
End Sub
Thanks!
Would anyone know what I have done wrong. Here is the code:
Private Sub cmdSubmit_Click()
On Error GoTo Err_Mail_Cancel
Dim intSeeOutlook As Integer
Dim bOption As Boolean
intSeeOutlook = MsgBox("Preview e-mail message?", _
vbYesNo, Me.cboCaseName & Me.Caption)
If intSeeOutlook = vbNo Then
bOption = False
Else
bOption = True
End If
DoCmd.SendObject acSendNoObject, , , Me.txtAttorneyEmail, , , _
Me.cboCaseName, "This will be the default message", bOption
DoCmd.GoToRecord , , acNewRec
Exit_cmdSubmit_Click:
Exit Sub
Err_Mail_Cancel:
Me.Undo
MsgBox ("Your Mail has been canceled!")
End Sub
Thanks!