Solved

data macro get username without vba

Posted on 2014-11-20
5
495 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 51

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 85

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 58

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 38

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

632 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