Email: auto populate "TO"
Thank you for taking the time to report an issue.
What's wrong... Please write below.
ID (an auto field)
Once the fields are filled in I want to click send (a command button located on the form) and the Note to field will populate the email address in anew outlook email, the re field will populate the subject line, and the message field will populate the body of the email.
I prefer this than sending an object, but if this is not possible may have to resort to sending the object.
My idea is that a set of queries will populate a"e-mail"-form and from there the user should have the option to Send the email, thus also creating a timestamp of this event. The email body is a"template" were"placeholders" should accommodate selected data. The email will accommodate 2 default attachments and one to be selected by each user. Ideally the"From" field should include a generic email address related to our"collective email-box".
Example: Combo Box Selection is "Prospect " and Text Box value would auto populate to "Opportunity"
or: Combo Box Selection is "Client " and Text Box value would auto populate to "Clients"
The Combo Box is named "Contact_Type" and the Text Box is named "Category"
Basically I'm looking for an Expression or VBA Code that can do this..
So basically, I want to email a report I'm generating in Access to someone but putting the report into the body of the email, After looking through theseforums, I found the following thread which was really useful on getting the basics done:
This is the code I've skilfully copied and pasted into my Access db:
So the above code correctly creates an email and populates the "To" and "Subject" fields fine. However, when it goes to populate the body of the email, this is what I get:
It's not replicating the layout of the report in the body of the email. It just seems to be giving me a load of rubbish instead!
I've also tried changing the ".body" to ".
Step1 - I created a Search query using the "Loan Number" field in "Master Table". I named this query"qry - Loan Information Search."
Step 2 - I then created a form using this Search query. However, the "Issue_ID" field in this form was unable to give me the drop down box, so I deleted and add the existing fields (Issue_ID and Issue_type) from the Master Table itself. Now, I have a Search form with "Issue_ID" field having the drop down box.
Step 3 - Create an auto populate field (Issue_type) in the form. I want to select the "Issue_ID" in the drop down box and the "Issue_type" field will auto populate based on the references in "Issue_Codes" table.
How can I write a DLookUp in "Issue_type" Control Source?
I need to send an email from Access 2007. I want to use an HTML file that is located at F:\Orbits Training Doc.html as the template for the email.
The subject line needs to be "Orbits Web Training"
I have a qry that is called myemailaddresses in which I need to use field "email" to populate the email address in outlook. The field will only have 1 result and not multiple.
If it makes it easier I could also use a .txt file as the body of the email but the HTML file is much cleaner as this is a communication that will be going out to customers
This works but obviously the "To" is blank on the Outlook email that it generates.
I've tried to have the code look on the form and pull the email address in by adding the form & field but that gives me the error msg! "Run-time error '2498' An Expression youentered is the wrong data type for one of the arguments"
my current code that is applicable to this part is
DoCmd.SendObject acSendNoObject, "", actext, "email at email.com", "", , "subject", strText
The report is updated in access so it doesn't need to be done in this code. I need this to be very simple. I am having code-writing-block. Please assist with this.
I would also like to have the format be txt not html or snapshot.
thank you all for the assistance.
here is my code
Dim strMsgBody As String
strmsgbody = ?
DoCmd.OpenReport "Daily_Text", acViewPreview, "", "", acNormal
DoCmd.SendObject acReport, "Daily_Text", "SnapshotFormat(*.snp)", "", "", "", "LNP Totals", strMsgBody, True, ""
MsgBox "Text Message report has been processed.", vbInformation