Audit Trail

Well, I'm at a loss to explain it. I see no logical reason, from any of your descriptions, as to why you can't add/edit a record in the subform when you have the code there.
 
sTable = frm.RecordSource
sPCName = Environ("COMPUTERNAME")
sPCUser = Environ("Username")
sDBUser = "Me" 'Get Username from the database login
sDateTime = Now()
how to changee "me" in tblAudit log Dbuser field to be another user login from my login table?
 
sTable = frm.RecordSource
sPCName = Environ("COMPUTERNAME")
sPCUser = Environ("Username")
sDBUser = "Me" 'Get Username from the database login
sDateTime = Now()
how to changee "me" in tblAudit log Dbuser field to be another user login from my login table?

If you are using Access User Level Security you can use

sDBUser = CurrentUser()
 
how to set up Access User Level Security in version 2007/2010 ?.

If using the ACCDB file format, you can't. If using the MDB file format, you can, but I don't have a copy with me right now to tell you where to go. I think it is on the Database Tools tab, but it would only be there if you have an MDB file.

If you have never used Access User Level Security, I would advise against going down that path as it has been removed from Access's newer file format(s).
 
This is great. What modification would be need to have this write to a separate table and/or a separate table in a separate DB? This way the application Db can remain small / compact / efficient and gain the security of keeping the change log in a separate secured DB. Please advise. Thank you.
 
how to set up Access User Level Security in version 2007/2010 ?.

You cannot. It has been removed in 2007+. BUT you can use the Windows API and VB to get the Network Used Id.

Private Declare Function apiGetUserName _
Lib "Advapi32" _
Alias "GetUserNameA" ( _
ByVal Buffer As String, _
BufferSize As Long _
) As Long

Private Sub cmdGetUserName_Click()
txtGetUserName.Value = GetUserName()
End Sub
 
Although GHudson's audittrail solution was posted 10 years ago, I have found nothing better: it's simple, fast and effective. Thank you.
 
Hi

I am getting a data mismatch error after selecting items from a multi select combobox, is there a way to solve this?

Thanks
 
Can anyone help me with the issue with multi select combobox? It is doing my head in.

Thanks in advance
 
Out of curiosity has anyone using this audittrail ever created a moderators hub in their db?

IE something like showing newly added records in the past two weeks and edited records in the past two weeks?

Having a really hard time with staff here continually entering the wrong data.

For example

Two fields

Cert Claim Date
Cert Recv Date

Pretty self explanatory right? Well for some reason staff enter the same date in both these fields, even though after we claim a cert it could be 4 to 6 weeks before a cert is received.
 
GHudson:
I do not want to appear really stupid, but when I try to open the file it won't let me. Says it is in read-only mode and I can't open it. And yes, I am trying to open it in Access 2010 which is the only version I have. Any suggestions. Would really like to see what you have done. Thanks.
 
No, I have been able to download and/or unzip files before without any problem. I'll try it again tomorrow on another computer. Thanks for answering. Not a big deal anyway.
 
Here is the new and improved version of my Audit Trail sample. Please post back if you have any suggestions. Thanks!

I am just new to this website however i found this website very useful for a beginner like me. I am working a simple Subsidiary Ledger for my studies and i think a piece of advise from you guys would help me improve. Here is my problem, i want to track down all users log-ins and the changes made in access.

I think your post ghudson is helpful only that i cannot view them since this requires at least 10 posts to view the file you shared. Thanks
 

Users who are viewing this thread

Back
Top Bottom