Solved

Access 2013 E-mail Notitification

Posted on 2015-02-12
3
62 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

910 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

21 Experts available now in Live!

Get 1:1 Help Now