Solved

Access 2013 E-mail Notitification

Posted on 2015-02-12
3
61 Views
Last Modified: 2015-02-18
I have a database of users and when access will expire, is there a way to set up Access 2013 to send me an e-mail when someone's access will expire ,, ?  - About 10 days before it does ..
?

Columns I made are : Last Name , First Name , ... ... , E-mail address , ... ... ... , Expiration Date
-


?
?

Thanks
0
Comment
Question by:mvalencia2003
  • 2
3 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40607278
Code like this should do what you need:

Private Sub Command0_Click()
'You may wish to purchase a product like this:
'http://www.contextmagic.com/express-clickyes/
'...to avoid the emal warming
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("qry10DayExp")
rst.MoveFirst
Do Until rst.EOF
    DoCmd.SendObject acSendNoObject, , , rst!emailAddress, , , "Expiration", "You will expire in " & rst!DaysTilEXP & " Days, on " & rst!ExpirationDate, False
    rst.MoveNext
Loop

MsgBox "Done"
rst.Close
dbs.Close
Set rst = Nothing
Set dbs = Nothing

End Sub


sample attached as well
Database67.mdb
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 40607280
sorry, here is the code again:
Private Sub Command0_Click()
'You may wish to purchase a product like this:
'http://www.contextmagic.com/express-clickyes/
'...to avoid the emal warming
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("qry10DayExp")
rst.MoveFirst
Do Until rst.EOF
    DoCmd.SendObject acSendNoObject, , , rst!emailAddress, , , "Expiration", "You will expire in " & rst!DaysTilEXP & " Days, on " & rst!ExpirationDate, False
    rst.MoveNext
Loop

MsgBox "Done"
rst.Close
dbs.Close
Set rst = Nothing
Set dbs = Nothing

End Sub

Open in new window

0
 
LVL 30

Expert Comment

by:hnasr
ID: 40610408
You may approach like this:

1 Set a timer event to run a daily procedure to find qualified records, and save to/update a table.
2 Another timer event to run a  function to read the table and send qualified emails.
3 Flag the table to show that a notification was issued.
4 Tou may improve the process to schedule how and when to resend notifications.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article describes some very basic things about SQL Server filegroups.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now