Solved

data macro get username without vba

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

758 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

23 Experts available now in Live!

Get 1:1 Help Now