E-mail a Table Macro

D

D. Austin

I have a macro that on a press of a button it e-mails a copy of a table to a
selected person. The will work on the first click of the button but not on
the second button. If I come back to it 5 min later, the second button
works but not the the first. I am wondering if it is in my code. If I
coud get the same macro sending two tables in one e-mail that would be great
too. Please help. Thank You

ivate Sub Command5_Click()

On Error GoTo Err_Command3_Click

Dim stDocName As String

stDocName = "tblCollections"
DoCmd.SendObject acReport, stDocName, acFormatXLS, "(e-mail address removed)",
"(e-mail address removed)", , "Collections Accounts", " Please update the attached
table with the changes in accounts held for collections. Thank You"

Exit_Command3_Click:
Exit Sub

Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click

End Sub

Private Sub Command6_Click()

On Error GoTo Err_Command3_Click

Dim stDocName As String

stDocName2 = "tblSpecialReseve"
DoCmd.SendObject acReport, stDocName, acFormatXLS, "(e-mail address removed)",
"(e-mail address removed)", , "Special Reseve Accounts", " Please update the
attached table with the changes in the special reserve accounts. Thank You"

Exit_Command3_Click:
Exit Sub

Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
 
H

Hospo

This thread is for macro's. You's is a programing issue. Please state your
problem there.
 
A

Adam Turner via AccessMonster.com

Hospo said:
This thread is for macro's. You's is a programing issue. Please state your
problem there.
I have a macro that on a press of a button it e-mails a copy of a table to a
selected person. The will work on the first click of the button but not on
[quoted text clipped - 42 lines]
Please don't waist time and text with this nonsense
 

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