CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 E-Mail only changed value...

Print topic Send  topic

Author Message
KIKITHEFLY
Posted: 01/19/2005, 2:26 PM

Hi,

Has anyone a simple code sample showing how whilst udpating i could keep only changed values to be sent by mail after the update ?

Thank you
Nicole

Posts: 586
Posted: 01/20/2005, 2:59 AM

Hello,
To check was field value modified by user or not you need to compare current field value with a one stored in a table before update code is fired, e.g. in Before Update event.
To get the current field value use
  
form_name.field_name.value  
to obtain a table’s value you need to execute custom query or call CCDLookUp() function:
  
Dim old_value  
Old_value = CCDLookUp("field_name", "table_name", form_name.DataSource.Where, DBConnection_name)  

Then compare both values with the help of VBScript StrComp function
  
if StrComp(old_value, form_name.field_name.value) <> 0 then  
response.write "the value was modified <br>"  
end if  

Using this approach collect modified values and use them in send mail code.

_________________
Regards,
Nicole
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.