473,624 Members | 2,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Query results to outlook

I am new to Access, but I find this answer a little difficult to
understand. I have an access query that list late work, I want to run
the query and let say the results is ten records. I want one email for
each record. The query has the name of the employee and the supervisor,
the title of the work and so on. I want the employee and supervisor to
be emailed. The name to email can be looked up from another table.

I see on MS sites such code as modules, SendMessage, and it works fine.
What I do not understand is how to get the results from the query
parsed (for each row) and sent that to the module? I think the parsed
row should be tokened and that would give me some of the email
information, email subject and body.

Hope I explained it... Any suggestions?

Douglas

Nov 17 '06 #1
4 3228
Have a look at the Email Senate sample database on his website which
does
exactly what you want:

=============== ============
http://www.datastrat.com/Download/EmailSenate2K.zip
BTW, this was recoded from an old database so many of the Senate email
addresses are no longer valid.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
=============== ============

Ron

Nov 17 '06 #2
MLH
I like the gyst of it. When I launched the process, I get an outlook
express compose window properly composed with the body text
and the HTML attached - but the To: field is void of any email
address. Looking at the code, I see that's that's exactly what it's
supposed to do. Its a useful app, no doubt about that. Of course,
one can easily cut 'n paste it email address from where it appears in
the body text or select it the usual way within OE. I like it!

I've used Lebans' PDF generator code a good bit to create reports
as PDF's that can be attached & sent. Has anyone modified (with
Arvin's permission, of course) this code to attach a PDF in a similar
fashion?

xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx

>Have a look at the Email Senate sample database on his website which
does
exactly what you want:

============== =============
http://www.datastrat.com/Download/EmailSenate2K.zip
BTW, this was recoded from an old database so many of the Senate email
addresses are no longer valid.
Nov 17 '06 #3
Thanks Ron:

I downloaded it and played with it. It does generate an email from a
form. I was looking to do it from a query. I want to run a query and it
process all the records that are late and send email directly.

d
On Nov 17, 5:38 am, "Ron2006" <ronne...@hotma il.comwrote:
Have a look at the Email Senate sample database on his website which
does
exactly what you want:

=============== ============htt p://www.datastrat.c om/Download/EmailSenate2K.z ip

BTW, this was recoded from an old database so many of the Senate email
addresses are no longer valid.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:http://www.datastrat.comhttp://www.mvps.org/access
=============== ============

Ron
Nov 20 '06 #4
Hi Douglas
I downloaded it and played with it. It does generate an email from a
form. I was looking to do it from a query. I want to run a query and it
process all the records that are late and send email directly.
I wrote an Mail Assistant app that works via DDE to do just this.

http://balance-infosystems.com/products/mail.assistant/

Example code is

With MailAssistant
.connect
If Not .connected Then
' try launching
.launch
.connect
End If
If .connected Then
'.verboseOff
.serverName "default"
.serverAddress "your.smtp.serv er.ip.or.addres s"
.serverPort "25"
.preferencesSav e
'.verboseOn
.templateName ("approval to proceed")
.newHTMLMessage
.addressedFrom "from.addr...@y our.domain"
.addressedTo "to.addr...@cli ents.domain" ' multiple
addresses separated by commas
.copiedTo "interested.par ties@domains" ' multiple
addresses separated by commas
.blindCopiedTo "audit.addres.. .@your.dormain" ' multiple
addresses separated by commas
.messageSubject "Artwork Approval And Order Confirmation
for Job Number [JOB NUMBER]"
.messageData "[JOB NUMBER=G52636],[DATE=26th, July
2007],[SENDER NAME=Mary Joseph],[RECEIVER NAME=Joseph Mary],[APPROVAL
NUMBER=25635],[JOB DESCRIPTION=Som e sort of job description],[JOB
QUANTITY=3000],[DATE TO BE DELIVERED=28th of July, 2006],[TOTAL
COST=5489.00], [PAYMENT TERMS=50% on Approval, 50% on Delivery],[SENDER
EMAIL=keith.hut chi...@balance-infosystems.com]"
.messageAttachm ents "rproxy.pdf " ' full path is normally
required, multiple attachments by separating by commas, attachment
dialog by pass an empty string
.messagesSend
'.verboseOff
Else
MsgBox "Unable to connect to Mail Assistant"
End If
.disconnect
End With

Regards

Keith

Nov 20 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2802
by: david liu | last post by:
access 2000 query: here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page itself, but i'd rather execute a query in access. i have success in running any query (basic SELECT, SELECT with conditions _other_ than LIKE, etc..) for some reason, when i execute the query below from the asp page, i get no results. the search.asp page just has a text box in a form that submits...
1
2581
by: M Stery | last post by:
I'm confused about the best way to accomplish this. Master Access db holds email addresses for a variety of job titles. Personnel holding those job titles and email addresses change all the time in the db. How do I set up an Outlook distibution list that basically runs a pre-defined Access query to retrieve the most current email addresses any time that particular distribution list is used? I'm either not understanding most of the help...
1
1948
by: Daveo | last post by:
Hi there, I have a contacts database, in which everyone is classified under a particular group e.g. staff,contractor etc. I would like to be able to send group e-mails. All I would like to happen is that a new message window opens in outlook and the To: field is populated with the e-mail addresses from the query results.
7
7277
by: Bernard D | last post by:
Hi, I'm using Access 97. I can run a query that finds a number of records, I then need to access these results to build a formatted text file containing all of the results. There will be 25 fields per record and potentially any number of records. I would have liked to have just produced a report sent to file but
18
2242
by: flynjack | last post by:
I have a table named "tblError". The table includes the following columns: (1) Employee ID (2) Error Code (3) Email Address (4) Email Sent (Check box from Yes or No, Yes if checked. I have a second table named "tblErrorCodes" that has two columns (1) Error Code (2) Error description. The tblError is populated by an append query and only pulls new records with error codes. My object is to pull a query that shows Employee ID's with the...
7
3711
by: fcolon75 | last post by:
I'm an experienced Access user, but very new to coding VBA in Access. I'd like to do the following: 1) Develop a basic query in the query designer. 2) Call that query from a VBA script 3) Manipulate the data from the results set in the VBA script (i.e. read data from fields into variables, etc.) This conceptually seems like it should be an easy thing to do. However, I'm finding it difficult to find articles or postings on the subject.
9
5043
by: egrill | last post by:
I am looking for away to link the results of my query to an Excel spreadsheet that will automatically update and then emailed. Right now I export and send. I need a more efficient way. It is on-going report done 3 times a week. Can I build a marco?
6
4394
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one field between them. The join field in both tables are indexed and I'm selecting 1 field from each table to lookup. The Access query is taking more than 60 second to retrieve 1 record and if I execute the same query within the Query Analyzer, it...
10
6902
by: Mike Miller | last post by:
Hi, Am wanting to send email with php and need to access the global outlook address book. Are there any examples/tutorials on how to do this? M
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6107
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.