By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 614 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

Insert Email Address

P: n/a
I'm sending a email via Access 2000 and don't have a problem with the
basic format. What I want it to automatically grab the email of the
tech and insert it in the TO. I have a combo box which lists the
techs name and in a seperate field has the email addresses. I also
have a separate table which contains just the emails. Any
suggestions?

This is the code I'm using.
Dim strEmailBody As String
Dim strEmailBodyOne As String
Dim strEmailBodyTwo As String
Dim strEmailBodyThree As String

strEmailBodyOne = "Field Investigation Report " & [Forms]![New FIR
Request]![FIR Number] & " has been created for you." & vbCrLf & "This
request is for " & [Forms]![New FIR Request]![Request] & "." & vbCrLf
& "At the following intersection: " & [Forms]![New FIR
Request]![Street #1] & " and " & [Forms]![New FIR Request]![Street #2]
& vbCrLf
strEmailBodyTwo = "Please investigate this request and provide
feedback to either " & [Forms]![New FIR Request]![Name] & " or
district " & [Forms]![New FIR Request]![District] & " representative
on the results of the study." & vbCrLf
strEmailBody = strEmailBodyOne & vbCrLf & vbCrLf & strEmailBodyTwo &
vbCrLf & vbCrLf
DoCmd.SendObject acSendNoObject, , , , , , "New FIR Request",
strEmailBody
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ko******@earthlink.net (Keith) wrote in message news:<8c*************************@posting.google.c om>...
I'm sending a email via Access 2000 and don't have a problem with the
basic format. What I want it to automatically grab the email of the
tech and insert it in the TO. I have a combo box which lists the
techs name and in a seperate field has the email addresses. I also
have a separate table which contains just the emails. Any
suggestions?

This is the code I'm using.
Dim strEmailBody As String
Dim strEmailBodyOne As String
Dim strEmailBodyTwo As String
Dim strEmailBodyThree As String

strEmailBodyOne = "Field Investigation Report " & [Forms]![New FIR
Request]![FIR Number] & " has been created for you." & vbCrLf & "This
request is for " & [Forms]![New FIR Request]![Request] & "." & vbCrLf
& "At the following intersection: " & [Forms]![New FIR
Request]![Street #1] & " and " & [Forms]![New FIR Request]![Street #2]
& vbCrLf
strEmailBodyTwo = "Please investigate this request and provide
feedback to either " & [Forms]![New FIR Request]![Name] & " or
district " & [Forms]![New FIR Request]![District] & " representative
on the results of the study." & vbCrLf
strEmailBody = strEmailBodyOne & vbCrLf & vbCrLf & strEmailBodyTwo &
vbCrLf & vbCrLf
DoCmd.SendObject acSendNoObject, , , , , , "New FIR Request",
strEmailBody

put the e-mail address into the column with the tech's name and just
use something like

strTechEmail=cboTech.Column(1)

to get it...
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.