Email with recipient specified from form/table

mcclunyboy

Registered User.
Local time
Today, 01:55
Joined
Sep 8, 2009
Messages
292
Hi

I want to email a recipient from a button on a form - the recipient is to be the person whose details are held in the form - say in the textbox txtemail...how do I get those contents and add them to the "to" on the email?

I am using the sendobject action in a macro!?
 
I don't know about a Macro but on the On Click event of a button or the On Dbl Click of the email address field I would use:

DoCmd.SendObject acSendNoObject, , , Me.YourfieldName

HTH
 
thanks - however I am trying to output a report to email.

At the moment the users are required to click a button, type the username in to generate the report, then once the email is open they have to type the username again into the address bar.

Your code works (except If I don't send it produces the expected error). How do i get the code to execute the query, generate the report and email automatically from the contents of the textbox.
 
I use this to create an invoice pdf and then email it to the appropriate person. it works really well. It outputs the report to .snp which it then converts to .pdf to attach it to the email.

Can't remember where I found it - it's not mine - but it's good.
 
Hi

thanks

Ill look into it -im no expert but I see the bits that could be useful for me.

Alex
 

Users who are viewing this thread

Back
Top Bottom