[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

Same Code - Different results

Hi,

..I have tried multiple fixes here but no joy .. 3 hours later..

I have written an audit trail.
There is an additional "memo" field on each record "Auditmemo".
 (Uses OldValue etc).

The audit trail works perfectly on form "AA_ThisWorks". (Note the unique record ID in grey on left of screen).  
The before update event of form is "=audit()".

All good so far!
However, when I try to use this audit trail on another form or table  ... the following happens.

PROBLEM: See AA_ThisFails
If there is more than one change to a single record then ONLY the last change is recorded in the "Auditmemo" field,

WHY ??  This works fine in AA_ThisWorks

(The Audit buttons on the screen may help to understand my problem).
I have hidden some forms/tables from view for simplification


All Help greatly appreciated on this one .... it has been frustrating me for hours.



Database1.zip
0
Patrick O'Dea
Asked:
Patrick O'Dea
1 Solution
 
Rey Obrero (Capricorn1)Commented:
test this

modified codes in the function audit
Database1.accdb
0
 
Patrick O'DeaAuthor Commented:
Perfect - thanks once again
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now