Email a report Error!

  • Thread starter mfrisbyuk via AccessMonster.com
  • Start date
M

mfrisbyuk via AccessMonster.com

Hi

I am trying to setup a button that will select a report and attact it as a
excel file to a email

when you click the button it will ask which team leader do you want, you type
in a name and then it transfers to outlook ok, but when you have done it once,
you can send another email as you get an error message "The SendObject action
was canceled."

below is the click button Information

Any help on this would be greatful

Mark

Private Sub Marx_Click()
On Error GoTo Err_Marx_Click

Dim stDocName As String

stDocName = "Marx"
DoCmd.SendObject acReport, stDocName, acFormatXLS, , , , "Marx 2 Details
for my Team"

Exit_Marx_Click:
Exit Sub

Err_Marx_Click:
MsgBox Err.Description
Resume Exit_Marx_Click

End Sub
 
G

Guest

you may need to include the email addresses of whom you are sending too or
set the Editmessage parameter to -1. you may be missing some parameters. try
that and see if it works.

Good luck!
Trace
 
M

mfrisbyuk via AccessMonster.com

Hi Tracey

I added -1 at the end of the line but now it gave me Reserved Error message
after i sent the message

the email address may have to change so i need then to beable to key this
information .

Button code:
*********
Private Sub Marx_Click()
On Error GoTo Err_Marx_Click

Dim stDocName As String

stDocName = "Marx"
DoCmd.SendObject acReport, stDocName, acFormatXLS, , , , "Marx 2
UserName/Password Needed.", "Please find a full list of everyone in my team
that does not have Marx 2 UserName or Password.", -1

Exit_Marx_Click:
Exit Sub

Err_Marx_Click:
MsgBox Err.Description
Resume Exit_Marx_Click

End Sub
*************
I think it looks like the button does not refresh it self or somethink.

Could this problem be because my work is using Access 2000, because i am not
getting the same error on Access 2003?.

Thanks

Mark
you may need to include the email addresses of whom you are sending too or
set the Editmessage parameter to -1. you may be missing some parameters. try
that and see if it works.

Good luck!
Trace
[quoted text clipped - 29 lines]
 

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

Similar Threads


Top