Need help w/ Network ID

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I recently purchased Garry Robinson's "Microsoft Access Database Protection
and Security" book. In one of his sample DBs, he included the form
"frmJetUserRoster" which shows which users are currently logged into a
database on a network.

Before I post my question, it might be best to refer to a small db
(NetworkID.zip) that I posted at the following site:
http://tombock2004.i8.com/Test


The sample db contains (for concept #1):
- tblDataStorage
- tblDataStorageHistory
- frmDataSource
- basFindUserName

The sample db also contains (for concept #2):
- frmJetUserRoster
- basGR8_Startup


Before asking my question, let me briefly describe the "differences" between
concept #1 and concept #2:

Concept #1:
When opening frmDataSource and selecting a name from the "MustDo" column,
the NetworkID reflects the name of the network id (user who modified record
most recently)

Concept #2:
When opening frmJetUserRoster, the column LOGIN_NAME shows "Admin"...


Here's my problem:
- on the network (when using frmJetUserRoster), all users show up as "Admin"
in the LOGIN_NAME column

Here's my question:
- how can I modify the frmJetUserRoster (and/or basGR8_Startup) so that it
follows the principle of the basFindUserName.
- For instance, I want to show "C-2104" or "Tom Bock" in the
frmJetUserRoster when the list is updated.


Does anyone know how to modify the module and/or form to accomplish this?


Thanks so much in advance,
Tom
 
Tom,
The problem is that it looks like you do not have security set up on your
databases. Those concepts are assuming you do. Because you do not have
security set up, all users are admin.
 
Klatuu:

Thanks for the feedback... how come I can use the "fOSUserName" function to
pull someone's name in a query or form?
 
Douglas:

Ah, I see... I appreciate your comment.

If you felt comfortable to view my sample file, do you know if there's an
alternative to implement the "Windows Login name" into Garry's form
"frmJetUserRoster" and/or the module "basGR8_Startup"?
 
Sorry, I'm unwilling to download a database. However, I've got a copy of
Garry's book. Where's the code in it?
 
Doug:

No problem... I understand.

Okay, in Garry's demonstration database "grMap2002", you'll find
"frmJetUserRoster" in Chapter 6.

Again, my problem is that it shows everyone logged in as "Admin". Instead
of that, I need to show the Windows Login ID.

Do you have any pointers as to how the module "basGR8_Startup" could be
modified to reflect the Windows Login ID in
frmJetUserRoster?
 
That code is essentially reading the LDB file, which doesn't know the
Windows Login Id. There really isn't any way to convert it to use the
Windows Login Id instead.

What some people do is add code to log the user id in a table of their own
every time the user opens the database, and again when they log out.
However, recognize that sometimes you're going to miss the logout process if
the machine reboots or something.
 
Back
Top