Send Email After Entry From Data Access Page

Arvin

I'm liv'in the dream ....
Local time
Yesterday, 17:42
Joined
Jul 22, 2008
Messages
192
Hello,

I have a DAP that is used by many to enter data. When the user enters data one of their steps is to select their managers name.

I would the DAP to send a email to the user (entering the data) and their manager once the new record they (The user) has entered in to the database.

Is this possible when using a DAP? I have been searching many sites/forums for any tips but can't seem to find anything.

Any help is appreciated ...thank you in advance,

Arv
 
In the Form's Before Update event you could use something like;
Code:
If NewRecord Then
     MsgBox "A new record was added an email message will be sent"
     [COLOR="Green"]'Insert your code to send Email message here[/COLOR]
End If
 
In the Form's Before Update event you could use something like;
Code:
If NewRecord Then
     MsgBox "A new record was added an email message will be sent"
     [COLOR=green]'Insert your code to send Email message here[/COLOR]
End If


Hello,

Is this for a "form" or Data Access Page"? ...
 
If you can call a script use the vbscripting method. Below are snippets of a script I use to email reports.

'Email:
'Verification Email:
Dim objEmail
Dim strEmailFrom, strEmailTo, strEmailSubject, strEmailMessage, strEmailCC
'Email:
Set objEmail = CreateObject("CDO.Message")
strEmailFrom = "[Email address]"
strEmailTo = "[Email address];[Email address];[Email address]"
strEmailCC = "[Email address];[Email address]"
strEmailSubject = "Text for subject line"
strEmailMessage = "Message text"

objEmail.From = strEmailFrom
objEmail.To = strEmailTo
objEmail.CC = strEmailCC
objEmail.Subject = strEmailSubject
objEmail.textbody = strEmailMessage
objEmail.AddAttachment ([File path\filename])
objEmail.Send

You can build the message text based on the values of the fields on the page to generate a custom message.

I don't work with DAP's but this should point you in the right direction.
 

Users who are viewing this thread

Back
Top Bottom