Emailing from form

L

Lowner

Hello Everyone,
Thanks for all the assistance on my previous questions, here is my
question for the day. How would I get to email just the current From and not
the entire contents of that file. i.e. I have a form with 1000 Purchase
Orders, I have created a Send Email command Button, but when I hit send, it
send all 1000 files in the folder instead of just that one that I have
filtered out, is there any way to send just that one. Thanks in advance for
any assistance.
 
W

Wayne-I-M

Hi

If you have the email address on the form it better. Like this
Say you want to attach a report call MrGoodReport
To an e mail address stored in a control call txtEMailAddress
And you want to put Hello World in the subject of the email
and Oh My God it's hot in the details
You could use something like this

Private Sub Button_Click()
DoCmd.SendObject acReport, "MyGoodReport", _
"RichTextFormat(*.rtf)", Forms!FormName!txtEMailAddress, , _
"", "Hello world", "Oh my god it's hot", False, ""
End Sub

Hope this helps
 
L

Lowner

Ok, thanks Wayne, I will give it a try.

Wayne-I-M said:
Hi

If you have the email address on the form it better. Like this
Say you want to attach a report call MrGoodReport
To an e mail address stored in a control call txtEMailAddress
And you want to put Hello World in the subject of the email
and Oh My God it's hot in the details
You could use something like this

Private Sub Button_Click()
DoCmd.SendObject acReport, "MyGoodReport", _
"RichTextFormat(*.rtf)", Forms!FormName!txtEMailAddress, , _
"", "Hello world", "Oh my god it's hot", False, ""
End Sub

Hope this helps
 
Top