Viewing users of a database (1 Viewer)

livmun

New member
Local time
Today, 08:35
Joined
Jun 1, 2015
Messages
4
Hello,
I used to have a handy tool called LDB Viewer or something like that with which I could see who is using my database. Now I've upgraded to MS 2010 is there a way to do the same?
Thanks for your help
 

JLCantara

Registered User.
Local time
Today, 00:35
Joined
Jul 22, 2012
Messages
335
Hello LivMun!

Yes indeed! Create a Logs table with the following fields:
Log (PK) - autonumber
PCName (indexed with duplicates) - string(15): holds the PC name use Environ("ComputerName").
UsrName (indexed with duplicates) - string(15): holds the user name use Environ("UserName").
DateIn - (date/time): date user entered
TimeIn - (date/time): time user entered
DateOut - (date/time): date user exited
TimeOut - (date/time): time user exited

In main menu, create a record when the app starts; on exit, using UserPC as a search key, update the log entry.

This way, you have useful data to monitor your app usage...

Good luck, JLCantara.
 
Last edited:

livmun

New member
Local time
Today, 08:35
Joined
Jun 1, 2015
Messages
4
Thank you so much for replying so quickly. I'm an amateur when it comes to this sort of thing can you put it in idiot's terms for me?:confused:
I understood the following, please can you let me know if I've got it right or what I'm missing?
I create a new table and call it 'Logs'?
I create the following fields? Log (PK) - autonumber
UserPC (indexed with duplicates) - string(15): store the PC name.
Is that a list of my users and their data that I should fill in?
Then add the following fields (Will I leave these fields blank?)
DateIn - (date/time): date user entered TimeIn - (date/time): time user entered DateOut - (date/time): date user exited TimeOut - (date/time): time user exited


Then start a macro and open the database? I don't know how to: on exit, using UserPC as a search key, update the log entry.
Thanks again for your help :)
 

rvsebi

Registered User.
Local time
Today, 10:35
Joined
Jun 1, 2015
Messages
77
I want to give u a link to take a module very good for u but i cant post links now. I need 10posts on the forum and i have only 5 with this :)
 

rvsebi

Registered User.
Local time
Today, 10:35
Joined
Jun 1, 2015
Messages
77
Go here http://www.tek-tips.com/viewthread.cfm?qid=362041 , read terms of use , make a module and after do this:

Make a table Log with fields NetBios,IP,Data,Hour
In that form who opens when your database open (FOpen for example) make
2 text with Visible = NO txthost and txtip
Make an event On Open or On Load and put this

[Forms]![FOpen]![txthost] = GetIPHostName()
[Forms]![FOpen]![txtip] = GetIPAddress()
Dim rst As Recordset, sqlstmt As String
Set dbs = CurrentDb
sqlstmt = "Log"
Set rst = dbs.OpenRecordset(sqlstmt, dbOpenDynaset)
rst.AddNew
rst![NetBios] = Me!txthost
rst![IP] = Me!txtip
rst![Data] = Date
rst![Hour] = Time()
rst.Update
rst.Close
 

JLCantara

Registered User.
Local time
Today, 00:35
Joined
Jul 22, 2012
Messages
335
Hello LivMun!

Here is an Access 2013 solution to your problem. The Main menu is an example of my solution. Note the strange handling of dates in the report: is it my Access or is it a general problem? No idea.

Good luck, JLCantara.:D
 

Attachments

  • AppUsers.zip
    46.1 KB · Views: 84

Users who are viewing this thread

Top Bottom