I've created a form for use by our employees. I have it simple as possible with a New Record, Save Record, and Email command buttons.
The email command is set up to mail a specific query that I have created. Everything works properly, but when you click to email a command pops up to select my format, and then opens microsoft office to have me type in the email addresses.
That is the default code for email. What needs to be done so that when I click the email command it selects the format and sends to predetermined addresses automatically?
I am an Access novice, so any help would be greatly appreciated.
The email command is set up to mail a specific query that I have created. Everything works properly, but when you click to email a command pops up to select my format, and then opens microsoft office to have me type in the email addresses.
Code:
Private Sub MAIL_Click()
On Error GoTo Err_MAIL_Click
Dim stDocName As String
stDocName = "PURCHASE ORDER Query"
DoCmd.SendObject acReport, stDocName
Exit_MAIL_Click:
Exit Sub
Err_MAIL_Click:
MsgBox Err.Description
Resume Exit_MAIL_Click
End Sub
That is the default code for email. What needs to be done so that when I click the email command it selects the format and sends to predetermined addresses automatically?
I am an Access novice, so any help would be greatly appreciated.
Comment