Solved

data macro get username without vba

Posted on 2014-11-20
5
405 Views
Last Modified: 2014-11-25
After much web surfing, I see data macros that reference VBA must have the VBA in the database that is making the data changes.  So if someone links to the database and makes data changes, we can't grab their user name unless they have the GetUserName function in their database.  

We think someone is changing data from another database but we can't tell who and we don't want to rely on everyone remembering to put the GetUserName function in every database they create or even make a reference to a database that has that function.

Has anyone come up with a solution that doesn't require VBA?
0
Comment
Question by:UniqueData
5 Comments
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 167 total points
ID: 40456760
That is not possible. If someone has been granted rights to the database file and has a tool to modify records it, it leaves no traces.
You'll have to monitor this at the server level via session and/or open files.

/gustav
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 167 total points
ID: 40457087
What version of Access? 2010 introduced the concept of data macros, which you may be able to use to log when the data was changed. As Gustav said, you can't really log who did it, but knowing when it changed might give you more information to determine who changed it.
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 166 total points
ID: 40457229
<<Has anyone come up with a solution that doesn't require VBA? >>

As the others have said, with a JET/ACE db, there are none.  Tracking must be built-in.

However with something like SQL Server, you could use transaction logs to determine who is making changes.

The reason you can do that is that no client directly touches the database on its own, everything goes through one central process.

With JET/ACE, every client touches the database directly, so unless it's built into the app, there is no tracking.

Jim.
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 40457351
You can control some things by making certain fields required and also by creating relationships and establishing RI.  In the BE, you need a table of authorized users.  In EVERY table, you need an UpdateBy column.  UpdateDT and CreateDT will also be useful.  Make the UpdateBy required and create a relationship with the Authorized users table and check the box to enforce RI.  That will force all Adds at least to log who made them and when.  I'm not sure what the capabilities of DataMacros are since I don't use them (I use SQL Server if I have requirements that must be implemented via triggers.) but you may be able to look at the pending update and determine that it has a userID destined for the UpdateBy field.  You don't actually have to validate it since the RI will handle that.  You just need to make sure it is present in the set of replacement data.
0
 
LVL 7

Author Comment

by:UniqueData
ID: 40463490
I didn't think there were any workarounds when using a 2010 Data Macro but figured I would ask :)

Thanks
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question