Users/Groups

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is there anyway I can get a list of users/groups in my access database into
a table or query?

Thanks
 
Levans said:
Hi,

Is there anyway I can get a list of users/groups in my access database into
a table or query?

Thanks

One way:

Place this code in a standard module:
http://www.mvps.org/access/api/api0008.htm

Create a table with SessionID, UserName, InTime, OutTime.

Insert a row into the table on the form's load event and update it on
the form's unload event. Track the SessionID with a form or module level
variable so you can update the appropriate row.

You can tell who's logged on by the absence of an OutTime.

HTH
 
Can you reword your steps I got the VB but you mentioned about forms and rows??
Please help

Will this ouput group memberships aswell?
 
Levans said:
Can you reword your steps I got the VB but you mentioned about forms and rows??
Please help

Will this ouput group memberships aswell?

Sorry, I guess I got a little ahead of myself there.

I'm not sure what you mean by group memberships. I go for network user
name and machine name.

The databases where I use this have a default form. In the form's Open
(not load) event I fire code that figures out the user ID, assigns a
unique SessionID, and inserts a new row in the "UserAudit" table with
the current time as InTime. On the same form's Close event I update
OutTime on the same row (identified by unique SessionID) with the
current time.

I can see who's currently using the database by looking at UserAudit
table rows with no OutTime. Moreover I can track who uses the database
and when because every session is logged.

The site I referenced above also has code to determine the machine name.

Having said all that there is a way to parse the ldb file for machine
ID's, but this only tells you which machines currently have the database
open.

Hope this clarifies things a bit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top