Re: Difficult one :) - Logging changes in my database made

Tech-Archive recommends: Fix windows errors by optimizing your registry



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




.



Relevant Pages

  • Re: DBD::Informix 2003.04 AIX4.3.3 SELECTIVE TEST ERRORS
    ... one which you could fix by removing the database). ... The bug report is below. ... > Informix Server Entries in sqlhosts file ... > # Error Message: ...
    (perl.dbi.users)
  • Re: Module Not Found
    ... Close the database. ... Still in the code window, choose Compile from the Debug menu. ... The error message could be related to something else that is going on, ... VB and press the cancel button I receive the error message ...
    (microsoft.public.access.formscoding)
  • Re: Cannot open my own Databases
    ... Windows Administrator and loads each of these service packs. ... If I have guessed correctly about the error message you see, ... See http://www.QBuilt.com for all your database needs. ... it's possible that the correct workgroup information file ...
    (microsoft.public.access.security)
  • RE: Form loading error
    ... Compact and repair your database; ... I just noticed that I get the same error message when I close the ... An error occured while loading Form_FrmXYZ. ... This Form (XYZ) is not the switchboard nor is it set to auto open. ...
    (microsoft.public.access.formscoding)
  • Re: Dates, Java, and Access Databases
    ... correctly connected and can write to the database. ... I need to have formatted input on the Form Fields. ... you should produce an error message and let them try fixing the data until ...
    (comp.lang.java.help)