Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to send an autotic e-mail reminder in Access?

Status
Not open for further replies.

stupiet

Programmer
Aug 21, 2001
176
0
0
US
Here's what I'm trying to do. You know how when your bank sends you an e-mail reminder every time your bill is about to be due? I want to do the same in Access but I'm not sure if this is possible. I'm assuming it may be possible if you keep the database running all the time so it knows when it is time to send one.

Has anyone done this before? I sure could use some tips on where to start and how to set it up or whether you would even recommend it.

Thanks
 
You wouldn't have to leave it running unless you use a timer. Another way would be to open the database each morning, and autoexec some code to send the mail out daily.

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
I think I would be inclined to use VBScript and the scheduler.
 
Hi Remou,

can you elaborate on this?

You would need a schedule to run a script?
You would need a script which opens the database?
You would need a module which checks the conditions and sends the mail?
You would need the script to close the database?

Any comments?

regards, GeorgesOne
 
A single script can access the database through ADO and check the condition. You can send an email through script with CDO or Outlook.

ADO Example:
Code:
Const db = "C:\Docs\LTD.mdb" 

Set cn = CreateObject("ADODB.Connection")
  
cn.Open _
   "Provider = Microsoft.Jet.OLEDB.4.0; " & _
   "Data Source =" & db
   
set rs=CreateObject("ADODB.RecordSet")

strSQL="Insert Into tblSell (AText) Values ('abc')"

rs.open strSQL, cn

Outlook Example:
Code:
Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(0) 'olMailItem
With MyItem
    .To = "a@b.c"
    .Subject = "Subject"
    .ReadReceiptRequested = False
    .HTMLBody = "Message<BR>Line 2"
End With
MyItem.Display

CDO:

Schedule:
 
Thanks Remou, for the detailed help.
I'm going to try it out and see how it works.

This should work exactly as I would want it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top