Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How would you capture before and after changes to data on subforms??

Status
Not open for further replies.

qmacg

Technical User
Aug 20, 2001
47
US
Hello:
I'm trying to devise a strategy of creating a before and after change log for data altered on a subform. Can anyone let me know what is the best event I can use on a field or current record of a form (i.e. OnCurrent). I'm going to create some VBA code in a module and call it when the event is triggered within the form. Just trying to figure out what event(s) to use for changes to data. I say events because if the user presses the escape button, I may have to cancel the called procedure and handle it appropriately. Any help would be appreciated.
 
What you're talking about is an audit log and it's not a simple task, but Allen Browne has an excellent tutorial on the subject here:




The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
How are ya qmacg . . .

You can use the forms or control(s) [blue]Before Update[/blue] event to see both:
[ol][li][blue]Me!ControlName[/blue] provides the current edited value.
Note the current value here is not comitted/saved yet![/li]
[li][blue]Me!ControlName.OldValue[/blue] provides the value before editing.[/li][/ol]
[blue]Your Thoughts? . . .[/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks Guys, I'll check these two things out. I appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top