Re: Difficult one :) - Logging changes in my database made
- From: LindaBee <LindaBee@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Nov 2008 06:19:02 -0800
Hi Allen
I coppied your code and followed instructions on creating an audit trail
when Itry to run it I get the error message
"Compile error Su or Function not defined"
When I clcik ok it is taking me to call AuditEnd in the BeforeUpdate Sub
What am I doing wrong
Linda
"Allen Browne" wrote:
See:.
Audit Trail - Log changes at the record level
at:
http://allenbrowne.com/AppAudit.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"ant1983" <ant1983@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:96492C81-7031-4E10-97E5-BBCD7BDB3402@xxxxxxxxxxxxxxxx
I have a database where different users would be able to change the value
of
certain fields.
I would like to capture the name of that user, the date and time of the
change and what was changed in a table so that i can report on this. (For
auditing purposes)
I have no idea how to go about this. I would imagine that i would have to
create the following tables:
tblUser
- autUserID
- txtUserName
- txtUserPassword
tblChanges
- autChangeID
- txtUserName (Linked with above table)
- dateChangeDate
- txtTableNameChanged (this would probably be the table that where the
change happened)
- txtFieldNameChanged (this would prob be the field in the table above
that
changed)
- txtRecordIDChanged (thsi would probably be the PRIMARY KEY of the record
in the table that was changed)
My questions are:
1 - Am i on the right track in terms of the structure as above?
2 - If so, how would i capture the old vs the new data - e.g. if in
table
"tblBooking" the value of the field "dateBookingDate" was changed from "1
March 2008" to "8 March 2008" - how would i capture this in my
"tblChanges"?
Would i have to add two extra fields; "txtOldValue" and "txtNewValue"?
3 - Lastly, how would my database know which user made the change? I
imagine that if the user start's their FE they would have to be prompted
for
their UserName and Password and the database would have to remember this
throughout the session? - How would i implement this?
Many thanks for this. I know ask a lot of questions and that it is quite
in-dept but i knwo this post will help a lot of users.
Thanks,
Wayne
- Prev by Date: Re: Access 2007 lookup tables for 2003 users
- Next by Date: Re: Serial one-to-many tables
- Previous by thread: Re: Difficult one :) - Logging changes in my database made
- Next by thread: Could Not Update; Currently Locked
- Index(es):
Relevant Pages
|