Re: Get User ID

From: Rick B (anonymous_at_discussions.microsoft.com)
Date: 07/19/04


Date: Mon, 19 Jul 2004 08:50:02 -0500

You would have to store the information somewhere. The best way is to
create a hidden form that opens when the front-end is opened. In the form's
open event, write code that stores the UserID (and date and time) to a
table.

On the form's close event, delete the record from the table, or update it to
include a time and date logged off.

This will work pretty well, but if Access crashes, the power goes off, etc.
then the table will not be accurate and you will have to fix it. I gues you
could make your open code look for any bad records for the user in the table
and delete them?

Rick B

"Nick" <anonymous@discussions.microsoft.com> wrote in message
news:2fe2101c46d7c$f52a7830$a301280a@phx.gbl...
I am wanting to have a field in my database that displays
a list of the current users on the database. I am
strugling to write this code.

Cheers

Nick



Relevant Pages

  • Re: Capture of First Use Date
    ... Here is another alternative done completely within the database. ... created when the main form opens. ... the first time the application is used. ... >> Where do you want to store it? ...
    (microsoft.public.access.forms)
  • Re: Unexplained code is running!
    ... I have prepared a database with only this form. ... attempt to open the main form, I get the same error message. ... Still the error message occurs when the form opens. ... and created my own Open event, ...
    (microsoft.public.access.formscoding)
  • Re: Form "relations"
    ... 3/ Do I want to store anything else with this, user name, ... to contain the calling forms name just after the calling ... opens the new form. ... parent/child relationship, something like ...
    (microsoft.public.access.formscoding)
  • Re: Record of Access
    ... In the Open event of the first splash screen you need to write today's date ... A consideration is what to do if the user leaves the database open a couple ... > when the user opens or closes my database so i can monitor the usage?Can ... > be done in any one of the two welcome screens or on the switchboard ...
    (microsoft.public.access.formscoding)
  • Re: Adding images to a screen and db.
    ... If you don't really need to store the image in a db, ... and have it show the image when the user opens a screen or ... icon when I open the screen if the image is a gif, jpeg. ... it is a bmp or ico it works fine. ...
    (microsoft.public.fox.programmer.exchange)