Home All Groups Group Topic Archive Search About

Listing current users at startup on the autoex form

Author
19 Sep 2006 2:19 PM
Leroy-P
As an administrator, I need to know who is logged into the data base at
openning screen, so I can notify they to exit, if the need arises? 
How do I do this, would I use the CurrentUser() and do I do that?
Thanks

Author
19 Sep 2006 2:33 PM
Kevin Jameson
you cant do this with microsoft access 2003

you must upgrade to access 20004 by clicking here:
http://www.ammara.com/access_image_faq/access_loading_image_dialog.html

HTH

Kevin
Show quoteHide quote
"Leroy-P" <Ler***@discussions.microsoft.com> wrote in message
news:5CD8A36F-251E-4BC4-97F4-1F3414326D2B@microsoft.com...
> As an administrator, I need to know who is logged into the data base at
> openning screen, so I can notify they to exit, if the need arises?
> How do I do this, would I use the CurrentUser() and do I do that?
> Thanks
Author
19 Sep 2006 2:51 PM
Keith Wilby
"Leroy-P" <Ler***@discussions.microsoft.com> wrote in message
news:5CD8A36F-251E-4BC4-97F4-1F3414326D2B@microsoft.com...
> As an administrator, I need to know who is logged into the data base at
> openning screen, so I can notify they to exit, if the need arises?
> How do I do this, would I use the CurrentUser() and do I do that?
> Thanks

The CurrentUser function returns the name of the account currently logged on
to the database.  You'd need to have invoked user-level security for it to
be of use  You can use the Environ property to return the network user ID,
although this can be tweaked by savvy users.  I use the Environ property
because, in my line of work, the risk of someone tampering with it is very
low.

Regards,
Keith.
www.keithwilby.com
Author
19 Sep 2006 3:13 PM
Ray
Leroy,

What I do is use Notepad to open the .LDB file. It's simple. It's a fast way
of knowing who is logged in. And no programming involved.

When an .MDB file opens, MS Access temporarily creates an .LDB file in the
same folder as the MDB file. When everyone logs out, this file disappears.
What I do is open this .LDB file using Notepad and it gives me a list of who
is logged in. It's a crude way of doing it but hey, it suits my needs.

There are tools out there that do this for you, or you can program it if you
want, but this is faster.

Ray


Show quoteHide quote
"Leroy-P" wrote:

> As an administrator, I need to know who is logged into the data base at
> openning screen, so I can notify they to exit, if the need arises? 
> How do I do this, would I use the CurrentUser() and do I do that?
> Thanks
Author
19 Sep 2006 4:00 PM
Leroy-P
That seemed to be my answer, but when I tried to open the with; Wordpad,
error message said it was in use by another program or appication.  The file
is locked.
Is there away to unlock the while it is in use?

Show quoteHide quote
"Ray" wrote:

> Leroy,
>
> What I do is use Notepad to open the .LDB file. It's simple. It's a fast way
> of knowing who is logged in. And no programming involved.
>
> When an .MDB file opens, MS Access temporarily creates an .LDB file in the
> same folder as the MDB file. When everyone logs out, this file disappears.
> What I do is open this .LDB file using Notepad and it gives me a list of who
> is logged in. It's a crude way of doing it but hey, it suits my needs.
>
> There are tools out there that do this for you, or you can program it if you
> want, but this is faster.
>
> Ray
>
>
> "Leroy-P" wrote:
>
> > As an administrator, I need to know who is logged into the data base at
> > openning screen, so I can notify they to exit, if the need arises? 
> > How do I do this, would I use the CurrentUser() and do I do that?
> > Thanks
Author
19 Sep 2006 4:01 PM
Granny Spitz via AccessMonster.com
Ray wrote:
> What I do is use Notepad to open the .LDB file. It's simple. It's a fast way
> of knowing who is logged in. And no programming involved.

Hon, the downside to this shortcut is that the LDB file shows Susie's and
George's computers as logged into the application when, in fact, Susie's been
in the Bahamas on her honeymoon for the last few days and George hasn't been
back to work since the sporting accident at the company picnic last weekend.
The reason for this is that the LDB file is created and as each new user
opens the database file, his CurrentUser( ) name and computer name are added
to the LDB file.  But as each user exits the database, his CurrentUser( )
name and computer name remain in the LDB file, because no records are ever
deleted from it.  The records for people who have exited the database are
eventually overwritten when new users open the database and replace the
exited users' records, but if there aren't two additional new users to
overwrite Susie's and George's records, they'll be listed as already "in the
database" when they finally return to work.  When the last user in the exits,
the LDB file will be deleted, but until then it may list a dozen or more
people in the database when there's actually only one.

If you want to know who *is* in the database, instead of who *was* in the
database, then you can read this Web page for some suggestions:

http://www.mvps.org/access/general/gen0034.htm

Author
20 Sep 2006 2:16 PM
Ray
In my particular case everyone logs out at the end of the day so the LDB file
gets recreated every morning. When it gets recreated, the old names get
flushed out. So if someone is on vacation, his/her name won't appear the very
next day. In case someone exits the database the same day, for me at least,
that's still ok because I send out an email saying "If you're still using the
database, please log off"...Keep in mind this was my temporary solution, I
know it's not the best one, but it was a quick and temporary one. I only have
20 users so I pretty much know who is on vacation or who is in the database
when I use this method.

Show quoteHide quote
"Granny Spitz via AccessMonster.com" wrote:

> Ray wrote:
> > What I do is use Notepad to open the .LDB file. It's simple. It's a fast way
> > of knowing who is logged in. And no programming involved.
>
> Hon, the downside to this shortcut is that the LDB file shows Susie's and
> George's computers as logged into the application when, in fact, Susie's been
> in the Bahamas on her honeymoon for the last few days and George hasn't been
> back to work since the sporting accident at the company picnic last weekend.
> The reason for this is that the LDB file is created and as each new user
> opens the database file, his CurrentUser( ) name and computer name are added
> to the LDB file.  But as each user exits the database, his CurrentUser( )
> name and computer name remain in the LDB file, because no records are ever
> deleted from it.  The records for people who have exited the database are
> eventually overwritten when new users open the database and replace the
> exited users' records, but if there aren't two additional new users to
> overwrite Susie's and George's records, they'll be listed as already "in the
> database" when they finally return to work.  When the last user in the exits,
> the LDB file will be deleted, but until then it may list a dozen or more
> people in the database when there's actually only one.
>
> If you want to know who *is* in the database, instead of who *was* in the
> database, then you can read this Web page for some suggestions:
>
> http://www.mvps.org/access/general/gen0034.htm
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200609/1
>
>
Author
20 Sep 2006 2:45 PM
Leroy-P
Thanks for all the help, I could not open the file while others were still in
and I need to who is in, so I can work.  The referenced site seems to be what
I need, but I haven't the time right now to verify.  Rather than an email
message it would be nice to broadcast a message. 
(http://www.mvps.org/access/general/gen0034.htm)

Again Thanks to all....

Show quoteHide quote
"Granny Spitz via AccessMonster.com" wrote:

> Ray wrote:
> > What I do is use Notepad to open the .LDB file. It's simple. It's a fast way
> > of knowing who is logged in. And no programming involved.
>
> Hon, the downside to this shortcut is that the LDB file shows Susie's and
> George's computers as logged into the application when, in fact, Susie's been
> in the Bahamas on her honeymoon for the last few days and George hasn't been
> back to work since the sporting accident at the company picnic last weekend.
> The reason for this is that the LDB file is created and as each new user
> opens the database file, his CurrentUser( ) name and computer name are added
> to the LDB file.  But as each user exits the database, his CurrentUser( )
> name and computer name remain in the LDB file, because no records are ever
> deleted from it.  The records for people who have exited the database are
> eventually overwritten when new users open the database and replace the
> exited users' records, but if there aren't two additional new users to
> overwrite Susie's and George's records, they'll be listed as already "in the
> database" when they finally return to work.  When the last user in the exits,
> the LDB file will be deleted, but until then it may list a dozen or more
> people in the database when there's actually only one.
>
> If you want to know who *is* in the database, instead of who *was* in the
> database, then you can read this Web page for some suggestions:
>
> http://www.mvps.org/access/general/gen0034.htm
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200609/1
>
>
Author
21 Sep 2006 8:31 PM
Ray Cacciatore
Try this:

The way I solved this issue with my database was to have my main menu form
(which is always opened in the background) check for a condition every 60
seconds. If the condition is true then the user sees a message popping up
saying "Please exit the database". I also made sure that after 5 minutes, the
application boots them off and automatically shuts down (because some people
may not be at their desk when the message pops up). I have a front end
application on each user's machine and a back-end database on a shared
folder. In the back-end I have a table with a Yes/No field called
"LockDatabase". This is the field that the main menu scans every minute.
Furthermore, I also added code so that users who attempt to start the
database after I lock it can't get in.

The reason this works for me is because I don't need to know who is in the
database, the application does all the work by logging everyone out.

Ray

Show quoteHide quote
"Leroy-P" wrote:

> Thanks for all the help, I could not open the file while others were still in
> and I need to who is in, so I can work.  The referenced site seems to be what
> I need, but I haven't the time right now to verify.  Rather than an email
> message it would be nice to broadcast a message. 
> (http://www.mvps.org/access/general/gen0034.htm)
>
> Again Thanks to all....
>
> "Granny Spitz via AccessMonster.com" wrote:
>
> > Ray wrote:
> > > What I do is use Notepad to open the .LDB file. It's simple. It's a fast way
> > > of knowing who is logged in. And no programming involved.
> >
> > Hon, the downside to this shortcut is that the LDB file shows Susie's and
> > George's computers as logged into the application when, in fact, Susie's been
> > in the Bahamas on her honeymoon for the last few days and George hasn't been
> > back to work since the sporting accident at the company picnic last weekend.
> > The reason for this is that the LDB file is created and as each new user
> > opens the database file, his CurrentUser( ) name and computer name are added
> > to the LDB file.  But as each user exits the database, his CurrentUser( )
> > name and computer name remain in the LDB file, because no records are ever
> > deleted from it.  The records for people who have exited the database are
> > eventually overwritten when new users open the database and replace the
> > exited users' records, but if there aren't two additional new users to
> > overwrite Susie's and George's records, they'll be listed as already "in the
> > database" when they finally return to work.  When the last user in the exits,
> > the LDB file will be deleted, but until then it may list a dozen or more
> > people in the database when there's actually only one.
> >
> > If you want to know who *is* in the database, instead of who *was* in the
> > database, then you can read this Web page for some suggestions:
> >
> > http://www.mvps.org/access/general/gen0034.htm
> >
> > --
> > Message posted via AccessMonster.com
> > http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200609/1
> >
> >
Author
22 Sep 2006 1:25 PM
Leroy-P
Unfortunly, I did not split my db when I first developed it and after reading
so much about how useful a split db is, at the next major upgrade I will
split mine and incorporate your ideas.

Thanks Ray

Show quoteHide quote
"Ray Cacciatore" wrote:

> Try this:
>
> The way I solved this issue with my database was to have my main menu form
> (which is always opened in the background) check for a condition every 60
> seconds. If the condition is true then the user sees a message popping up
> saying "Please exit the database". I also made sure that after 5 minutes, the
> application boots them off and automatically shuts down (because some people
> may not be at their desk when the message pops up). I have a front end
> application on each user's machine and a back-end database on a shared
> folder. In the back-end I have a table with a Yes/No field called
> "LockDatabase". This is the field that the main menu scans every minute.
> Furthermore, I also added code so that users who attempt to start the
> database after I lock it can't get in.
>
> The reason this works for me is because I don't need to know who is in the
> database, the application does all the work by logging everyone out.
>
> Ray
>
> "Leroy-P" wrote:
>
> > Thanks for all the help, I could not open the file while others were still in
> > and I need to who is in, so I can work.  The referenced site seems to be what
> > I need, but I haven't the time right now to verify.  Rather than an email
> > message it would be nice to broadcast a message. 
> > (http://www.mvps.org/access/general/gen0034.htm)
> >
> > Again Thanks to all....
> >
> > "Granny Spitz via AccessMonster.com" wrote:
> >
> > > Ray wrote:
> > > > What I do is use Notepad to open the .LDB file. It's simple. It's a fast way
> > > > of knowing who is logged in. And no programming involved.
> > >
> > > Hon, the downside to this shortcut is that the LDB file shows Susie's and
> > > George's computers as logged into the application when, in fact, Susie's been
> > > in the Bahamas on her honeymoon for the last few days and George hasn't been
> > > back to work since the sporting accident at the company picnic last weekend.
> > > The reason for this is that the LDB file is created and as each new user
> > > opens the database file, his CurrentUser( ) name and computer name are added
> > > to the LDB file.  But as each user exits the database, his CurrentUser( )
> > > name and computer name remain in the LDB file, because no records are ever
> > > deleted from it.  The records for people who have exited the database are
> > > eventually overwritten when new users open the database and replace the
> > > exited users' records, but if there aren't two additional new users to
> > > overwrite Susie's and George's records, they'll be listed as already "in the
> > > database" when they finally return to work.  When the last user in the exits,
> > > the LDB file will be deleted, but until then it may list a dozen or more
> > > people in the database when there's actually only one.
> > >
> > > If you want to know who *is* in the database, instead of who *was* in the
> > > database, then you can read this Web page for some suggestions:
> > >
> > > http://www.mvps.org/access/general/gen0034.htm
> > >
> > > --
> > > Message posted via AccessMonster.com
> > > http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200609/1
> > >
> > >