Email Button

K

Kyle

In my form, I have a button name EmailPO. When user
click on this button, it is suppose to create a snap shot
of current record then open a new message window from MS
outlook express. Likely the user encountered this error
message "Microsoft Access cann't open the mail session".
The following is the On click event procedure code for the
button.

Private Sub cmdEmailCurrentPO_Click()
On Error GoTo Err_cmdEmailCurrentPO_Click

Dim stDocName As String

stDocName = "Purchase Order Form"

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport stDocName, acViewPreview, ,
"PurchaseOrderID=" & Me.PurchaseOrderID
DoCmd.SendObject acReport, stDocName, acFormatSNP

Exit_cmdEmailCurrentPO_Click:
Exit Sub

Err_cmdEmailCurrentPO_Click:
MsgBox Err.Description
Resume Exit_cmdEmailCurrentPO_Click

End Sub

Is there a file missing or corrupted? Is there away to
code the Event procedure so that it is open only specified
Email software. Any help to result this problem would be
appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top