E-mail notification when table is modified

kaveman

Registered User.
Local time
Today, 05:37
Joined
May 12, 2004
Messages
58
I have a form I use to gather requests on certain issues. These requests go straight from the form into a table. Is there a way I can be notified by e-mail when someone has made a change to my table (ie. made a request) so I don't have to constantly check for requests? As always thanks in advance.
 
Have you tried the SendObject method?
 
Not yet. I haven't because I am not familiar with how to use it. Any advice?
 
The Visual Basic editor help would be a good place to start.
 
Got it but now an error appears

Here is the code I used:

DoCmd.SendObject acSendTable, "tbl W5", "(*.xls)", ("Kgallagher@gallagheruniform.com"), "", "", "New Softrak Request", "You have a new Softrak Request", False

It works fine. My new problem is I receive an error message from Outlook stating "A program is trying to send e-mail on your behalf. Do you want to allow this? If this is unexpected it could be a virus and you should choose no."

Any suggestions. The server I run on has a lot of security measures in place; could that be it?...or is it something simpler?

At any rate thanks for turning me on to the send object command. Once I can get this error out of the way these e-mails are going to help me a whole lot.
 
I use this in a subform to send out emails.... I dont get that message, I used too, but not with this code.... I had to include "On Error Resume Next" in case someone closed the email without sending due to an error Outlook would do....
I believe a simple If/Then statement on the change in values of your controls could trigger the send mail portion... My email address gets filled in by whatever "Assigned_To.Column(1)" value is from my employee tables email column......

Code:
Private Sub Command20_Click()
On Error Resume Next
    Dim daBody As String
    daBody = ""
    daBody = daBody & "UPC: " & Forms!frmMainData!UPC.Value & vbCrLf
    daBody = daBody & "TASK: " & Tasks.Value & vbCrLf
    daBody = daBody & "Start date: " & Assigned_Date.Value & vbCrLf
    daBody = daBody & "Due date: " & Due_Date.Value & vbCrLf
    daBody = daBody & "Assigned by: " & Assigned_By.Column(0) & vbCrLf
    daBody = daBody & "Notes: " & NOTES.Value & vbCrLf
    
    DoCmd.SendObject acSendNoObject, , , Assigned_To.Column(1), , , "New Assignment", daBody
End Sub
 
Much Appreciated

Thanks all for your help on this one. Now I don't have to constantly check my tables. :)
 

Users who are viewing this thread

Back
Top Bottom