Link to home
Start Free TrialLog in
Avatar of kaleelee21
kaleelee21

asked on

Email Alerts for New Record

I am creating a database for Weekly Activity Reports. When the user submits a new Weekly Activity Report, I would like to send an alert to the current user's supervisor to notify him/her that their employee's Weekly Activity Report was submitted. The default email client is Microsoft Outlook.

Is there a way in Microsoft Access to do this?

Thanks!
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

How is the Weekly Activity Report submitted? button click?
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kaleelee21
kaleelee21

ASKER

MacroShadow - Yes, it's submitted with a button click.
Then you could use the SendObject method I described earlier in that same Button Click event.
Or you could automate Outlook as Scott previously mentioned.

This should give you an idea how to automate it.
Sub demo()
    Dim oApp As Object
    Dim oMail As Object
    Set oApp = CreateObject("Outlook.Application")
    Set oMail = oApp.CreateItem(0)
    oMail.Body = "Body of email"
    oMail.Subject = "Test Subject"
    oMail.To = "Someone@somewhere.com"
    oMail.Send
    Set oMail = Nothing
    Set oApp = Nothing
End Sub

Open in new window

Thank you!