J
|
Jane 4/24/2007 |
Hi,
|
R
|
rustygrooser author 4/24/2007 |
Thank you for your quick reply. |
J
|
Jane 4/24/2007 |
All entered values are stored in the dict collection. Just replace email, message and subject variables with your values in the sample code: Function BeforeEdit(dict, where) ' Parameters: ' dict - Scripting.Dictionary object. ' Each field on the Edit form represented as 'Field name'-'Field value' pair ' where - string with WHERE clause pointing to record to be edited '** Send email with new data **** ' do not forget to setup email parameters like From, SMTP server etc ' on 'Security->User login settings' dialog Dim keys message="An edit attempt is in progress for the following.»»»" keys = dict.keys For n = 0 To dict.Count-1 message = message & keys(n) & " : " & dict(keys(n)) & vbcrlf Next email="myusername@my domain.com" subject="Warning! Record to be updated." sendmail email, subject, message BeforeEdit = True ' set BeforeEdit to True if you like to proceed with editing this record ' set it to False in other case End Function |
R
|
rustygrooser author 4/25/2007 |
Thanks! It works. |
J
|
Jane 4/25/2007 |
Hi, str = "select * from " & strTableName & " where " & where Set rsTemp = server.CreateObject("ADODB.Recordset") rsTemp.open str, dbConnection 'add record ID to the subject subject="Warning! Record # " & rsTemp("FieldID") & " to be updated." rsTemp.Close : set rsTemp = Nothing
|
R
|
rustygrooser author 4/25/2007 |
Thanks! Again its working. |
![]() |
Sergey Kornilov admin 4/25/2007 |
Try to add the following line right before you can Sendmail function: cfrom = dict("UserEmailField") |
R
|
rustygrooser author 4/26/2007 |
Try to add the following line right before you can Sendmail function: cfrom = dict("UserEmailField")
|
J
|
Jane 4/26/2007 |
Did you replace UserEmailField with your actual field name where user email is stored? |