Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 10th, 2003, 11:40 AM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table Audit

Hello folks I hope someone can help.

I have a need to keep an audit log report for a table in an Access project linked to MS SQL. I need a query/SP/what ever to help me show the following;

Field <FieldName> was changed by <SYSTEM_USER> from <OriginalValue> to <NewValue> on <Getdate()>.

Any help would be greatly apreciated.

Thanks,
Jesse
__________________
Thanks,
Jesse
 
Old June 10th, 2003, 12:22 PM
Authorized User
 
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I dont know if SQL server stores this information automatically.

You could have a procedure in your Access code that wrote changes to a text file (or even a database table) and run your report from that. You could store it in any format you wanted; ideally XML would be the most versatile and flexible way to store the information, but a character delimitted file would be feasible.
 
Old June 10th, 2003, 12:44 PM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for replying!
I have a table that I built with the fields I want to track and a stored procedure with input parameters that performs an insert into sql statement.
I would like to save to static variables of all of the form field values when the form loads (only one record is displayed in the form at a time) and when a field value changes (on dirty event)pass the original static value and the new value to the stored procedure through a "RUN SQL" command. The issue is that I cant remembe how to store and retreive the static "Original Value".

Thanks,
Jesse





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an Audit Trail Jade08 Pro VB 6 3 October 23rd, 2008 12:44 AM
Infopath Audit Trail sqaengineer Infopath 0 August 13th, 2007 10:10 AM
Audit in BizTalk steveculshaw Biztalk 0 June 28th, 2007 05:02 AM
audit logging ted BOOK: Access 2003 VBA Programmer's Reference 0 August 23rd, 2005 09:06 AM
Table Audit jesseleon SQL Server 2000 3 July 16th, 2003 02:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.