Full Version: Notify user when memo field has changed
UtterAccess Forums > Microsoft® Access > Access Forms
What is the easiest/best way to tell if a memo field has changed?
Currently, I have a table with fields AUDIT.old_value and AUDIT.new_value. AUDIT.old_value is updated with the length of the field on the GOT FOCUS event and then AUDIT.new_value is updated on the LOST FOCUS event with the length.
Ocan't figure out where to go from here. I think I should subtract the two values and if >0 then there has been a change. I would like to do the calculations in code, and be able to reference the results. Something like:
If new_value-old_value>0 then
send email
end if
I already know how to do the email thing.
I normally do this in the form using the control's values.
If you have a memo field bound to the control named txtMyMemo then
If Me.txtMyMemo.Value <> Me.txtMyMemo.OldValue then
' the data has changed so do something
You might want to look into storing your data differently. You may want t he changes to be entered ion t a new record each tome that is date/time stamped. This way when a new record is created, then you can send the email.
Also if the memo field is in a separate record, then you could easily look for a record change and then send your email
Hope this helps ...
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.