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

Automatic e-mails on basis of query

Hello,

I've searched for the information, but i can't find the real specifics...if someone would be so kind to help me?

I've made a database that stores information about potential customers and with a table that stores the several contacts with the dates attached.

Now, I've created a query that lists all the potential customers who haven't been contacted since 30 days. On basis of this query, an automatic e-mail should be created with a standard e-mail message and with possible attachments.

I know this has to be done through programming, but i don't know anything about that...

Can anyone tell me step by step how i should do this.

Thx, a LOT
Apr 11 '07 #1
1 1506
pks00
280 Expert 100+
What u could do is create some code that uses your sql that u have created to obtain their email addresses then send out an email

Are these emails a specific email to each customer or just one common email?
I say that because of the way the code needs to be built up
eg - one mass email


Expand|Select|Wrap|Line Numbers
  1. public sub SendEmails
  2.     dim rs as dao.recordset
  3.     dim sEmailList as String
  4.  
  5.     sEmailList = ""
  6.     set rs=currentdb.openrecordset("mypredefinedqueryhere")
  7.     do while rs.eof = false
  8.         sEmailList = sEmailList & ";" & rs!Email    'get value from field called Email
  9.         rs.movenext
  10.     loop
  11.     rs.close
  12.     set rs=nothing
  13.  
  14.     'Check email send
  15.     if sEmailList <> "" then
  16.         sEmailList = Mid$(sEmailList,2)
  17.         DoCmd.SendObject acSendNoObject, , acFormatRTF, sEmailList, , , "SUBJECT", "MESSAGE", False
  18.     end if
  19. end sub
  20.  

to do one email per customer, u would move the SendObject within the loop
Apr 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Rasmus Fogh | last post by:
Someone raised the question of automatic code generation a few weeks back. And yes, we (CCPN) are using automatic Python code generation in a major way. Basically we are making data models in...
6
by: Gert van der Kooij | last post by:
Hi, It's no problem to define the automatic maintenance using the wizard but I want to use commands to automate automation. I captured the SQL statements when activating the maintenance but that...
1
by: Michel Esber | last post by:
Hello, Linux RedHat AS4 running DB2 V8 FP11. I have followed the docs at http://tinyurl.com/qckrn and enabled automatic statistics collection. It has been 2 days since I updated my DB cfg and...
58
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
3
by: Laurence | last post by:
Hi folks, DB2 UDB supports automatic storage management in v8.2.2 and v9. The question is how do I know the databases and/or tablespaces are enable "automatic storage management" or not after...
4
by: beena | last post by:
All, I'm new to the concept of automatic storage... I'm looking at the database setup by a vendor. I see few tablespaces showing up with automatic storage - Yes. Tablespace ID ...
0
by: RG | last post by:
I have a stored procedure which is called by db2 "call ....." statement from ksh script. When running from AIX DB2 v. 9.1.3 environment, after a while the stored procedure starts to hang and...
3
by: myjish18 | last post by:
Hello, We have a DB2 UDB database v8.2.7 (db2 v8.2 fixpak 14) on AIX 5.3 which has Automatic Storage (AS) enabled. We want to disable automatic storage on entire database and/or disable...
25
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
4
by: Joerg Battermann | last post by:
Hello there, does anyone know the precise naming conventions used for internal backing fields for automatic properties? Something official besides looking at the compiled assemblies that might...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.