Adam
I'd use a table for this. Make it a local table and run a "DELETE* FROM myTable" query when the database opens. Then insert the user name into the table so there is only the one record.
By the way, if you give the user a compiled ACCDE or MDE file you can just assign the user name to a global variable. Those two versions of the database will retain the variable's value even if there is an unhandled error during processing.
Regards,
Bill Mosca,
Founder, MS_Access_Professionals
That'll do IT http://thatlldoit.com
MS Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My Nothing-to-do-with Access blog
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, November 05, 2015 10:28 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] How to track users in a split database?
I'm getting the user via the GetUserName function. I keep track of the user throughout their session to manage permissions and hidden fields on different forms. In the past, I've put the name into a hidden, unbound form, frmUser, with a field UserName, that I refer to in Form_Current events. Is there a "better" way of doing this?
Adam
Denver, CO
Posted by: "Bill Mosca" <wrmosca@comcast.net>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar