Solved

data macro get username without vba

Posted on 2014-11-20
5
386 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 34

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now