473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 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
1 1669
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: johnnyboy10017 | last post by:
I am having a hell of a time with what I think is a very simple query: It won't actually insert a new record into the specified table, but returns no error, in fact it returns "1" (or true) that...
25
by: Andreas Fromm | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Im building an user database with many tables keeping the data for the Address, Phone numbers, etc which are referenced by a table where I...
6
by: Dan Keeley | last post by:
Hi, I've got another problem now! Getting "Input string was not in a correct format" I have this as my insert command: myDataAdapter.InsertCommand = connection.CreateCommand()...
3
by: mahajanvit | last post by:
Hi one and all I got this problem during my project. So in order to solve this I made a very small application. I am trying to insert using SP and sqldatasource control. I know that while using...
6
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am...
3
by: andrewtayloruk | last post by:
I'm a newbie when it come to things php and i'm having a bit of trouble. I'm trying to insert data from an html form into a mysql database and can't get it to work. Just a few bits about my...
8
by: andrewtayloruk | last post by:
Hi i was wondering if anyone could help.... I have made a little script that puts whatever a user enters into a mysql database. As well as the forms my script has an image input that uploads an image...
5
by: xzzy | last post by:
I am writing an app that enables a user to reply to a newsgroup. The proper syntax for From: is "screen name" email@address.com and over all, it should look like: --
3
by: ctrap | last post by:
Hi Everyone, Here's my situation: I'm making a website for an employment agency, there is a page where potential employees can visit and "pre-register". When the submit button is hit the...
8
by: Betikci Boris | last post by:
Can not insert data into SQLite3 database through browser however i can easily insert data into my db from konsole, in both attmpts i used php 5.2.6 on 2.6.25.* linux kernel i think there is a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.