473,386 Members | 1,817 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,386 software developers and data experts.

Selective emailing

I have a database that has a table in it with employee information (name,
dob, email, etc). This is joined to a table that has tasks that are
assigned to each individual that has a recurring date. For example, Joe
must take an annual CPR class, Bob needs to take his Hearing Test, Ann must
take her Eye Exam. The task table keeps the completed date in it, while the
form that displays it calculates the next due date (using dateadd). So, as
simple as this is designed, here is my issue. I need to be able to generate
a form that shows only the employees that are late with their tasks (can be
multiple employees on the same task) and not selecting individuals that are
within limits. Once this is displayed I need to select a command button
that will email these people to inform them that they are late with their
tasks. I would like to see where I can email everyone in one shot instead
of separate emails. The task table can have multiple tasks in it so each
task has to be analyzed and be part of this late report. Any suggestions?
Nov 12 '05 #1
2 1947
Pat
You mention a preference of emailing everyone at once. By doing this, you
might consider is whether you want each person on the recipient list to see
what everyone else is overdue for.

That said, the simplest way (IMO) to send a quick and dirty email on an
NT-based machine (NT, 2K, XP) is with CDONTS. The machine must be running
the SMTP service and have access to the internet. You will also need to add
a reference to the CDO library within Access. After this, it's as simple
as:

Dim oEMail As New CDONTS.EMail

oEMail.From "an*****@anydomain.com"
oEMail.To "yo*******@yourdomain.com"
oEMail.BodyFormat = CdoBodyFormatText
oEMail.Body = "Insert some useful text here"
oEMail.Importance = CdoHigh
oEMail.AttachFile "C:\filename.txt"
oEMail.Send

A great overview of the many options for email with Access is at Tony Toews'
website:
http://www.granite.ab.ca/access/email.htm

HTH
Pat

"Chuck" <cj*****@hvc.rr.com> wrote in message
news:ML********************@twister.nyc.rr.com...
I have a database that has a table in it with employee information (name,
dob, email, etc). This is joined to a table that has tasks that are
assigned to each individual that has a recurring date. For example, Joe
must take an annual CPR class, Bob needs to take his Hearing Test, Ann must take her Eye Exam. The task table keeps the completed date in it, while the form that displays it calculates the next due date (using dateadd). So, as simple as this is designed, here is my issue. I need to be able to generate a form that shows only the employees that are late with their tasks (can be multiple employees on the same task) and not selecting individuals that are within limits. Once this is displayed I need to select a command button
that will email these people to inform them that they are late with their
tasks. I would like to see where I can email everyone in one shot instead
of separate emails. The task table can have multiple tasks in it so each
task has to be analyzed and be part of this late report. Any suggestions?

Nov 12 '05 #2
Chuck,
Finding late tasks is something SQL should do nicely. docmd.sendobject is a
built-in call to the local system's e-mail software to send a message with
an attached object from Access. There is an option to sendnoobject, giving
you the ability to just send the e-mail. So, the algorythm goes something
like:

Private Function NagUsers() as long
'define error handling, if any.

'Get list of late users

'For each late user, concantenate thier e-mail address to a recipient list,
skipping any that don't have an address.

'Call docmd.sendobject with the sendnoobject option and using the previously
created recipient list.

'Clean up anything created to complete the task.

'Exit function

'Error handling would go here.

End Function

"Chuck" <cj*****@hvc.rr.com> wrote in message
news:ML********************@twister.nyc.rr.com...
I have a database that has a table in it with employee information (name,
dob, email, etc). This is joined to a table that has tasks that are
assigned to each individual that has a recurring date. For example, Joe
must take an annual CPR class, Bob needs to take his Hearing Test, Ann must take her Eye Exam. The task table keeps the completed date in it, while the form that displays it calculates the next due date (using dateadd). So, as simple as this is designed, here is my issue. I need to be able to generate a form that shows only the employees that are late with their tasks (can be multiple employees on the same task) and not selecting individuals that are within limits. Once this is displayed I need to select a command button
that will email these people to inform them that they are late with their
tasks. I would like to see where I can email everyone in one shot instead
of separate emails. The task table can have multiple tasks in it so each
task has to be analyzed and be part of this late report. Any suggestions?

Nov 12 '05 #3

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

Similar topics

0
by: Mike Connor | last post by:
I am having trouble getting Conditional Folder creation & File insertion to work using VS .Net in a Deployment Project for a C# app. I am displaying a generic Textbox Dialog under the User...
1
by: Stanley Cheung | last post by:
Hi all, I am developing the application for send emailing list, actually, i can perform to send a email 1 by 1 and do it on aspx page. I have a enquiry that how can the application change to...
3
by: tafs7 | last post by:
My code below is supposed to email me when an error occurs on the application, but it's not emailing anything. Am I missing something? I know the smtp servers I've tried work. I even added a...
4
by: Mike Moore | last post by:
What is the best way to launch outlook from an asp.net web page? Can you do this using MAPI or is there a control that you can purchase? We are unable to use SMTP. We use MS Exhange and MAPI...
1
by: Solitus | last post by:
I have databinding problem with a repeater <ItemTemplate> <tr> <!-- fixed content --> </tr> <tr> <!-- optional content --> </tr> </ItemTemplate>
2
by: Tim Hunter | last post by:
I have two questions regarding emailing from Access. My first question relates to how many email addresses is too much. I have a client who wants to email 1500 people at once. Is this possible or...
4
by: alex.hatzisavas | last post by:
Dear all, I'm trying to do a selective deletion from an 'Archive' table based on dates. Here is the setup: Table 'Archive' has a date field ( ). Another table ('Cutoffs') defines the Low...
20
by: paul814 | last post by:
I've been working on this for some time now and have gotten nowhere...hoping someone here can help. I want to take and email all records in a database for the current date when this php page is...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
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.