Insert Email Address

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith

    #1

    Insert Email Address

    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 strEmailBodyThr ee 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.SendObjec t acSendNoObject, , , , , , "New FIR Request",
    strEmailBody
  • Pieter Linden

    #2
    Re: Insert Email Address

    kodiak33@earthl ink.net (Keith) wrote in message news:<8cd96ae6. 0408192052.dd7d db5@posting.goo gle.com>...[color=blue]
    > 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 strEmailBodyThr ee 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.SendObjec t acSendNoObject, , , , , , "New FIR Request",
    > strEmailBody[/color]


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

    strTechEmail=cb oTech.Column(1)

    to get it...

    Comment

    Working...