DAO dbOpenSnapshot Problem with Memo Fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created an audit trail routine which compares a static
(dbOpenSnapshot)recordset captured in the Form_Dirty procedure against a
subsequent recordset captured in the Form_AfterUpdate procedure. I compare
each field's before/after values and write the adds/changes/deletes to a
special audit table.

This process is working perfectly except for memo fields. Any memo fields
captured in my Form_Dirty procedure are already dirty when the recordset is
created.

Why is that, and any suggestions how to proceed? I hate that I got this
routine working well only to discover this problem.
 
Try checking the length of the text in the memo field by using the LEN()
function and storing it in a variable in the Current event:

Dim lngLen1 As Long
lngLen1 = Len([MyMemo])

Then in the BeforeUpdate event of the form check the length again. If the 2
lengths don't match, add the memo field to the data being captured.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top