Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2005
    Posts
    196

    Unanswered: Restricting User log ons

    I have a table listing authorised users, and a value of 1 if they're a normal user and 0 if thy're an administrator. This filed is called UserCount Also, there is a check box which will determine whether or not a user is logged on. When a user logs on, i will use a SQL statement to turn the checkbox to true.

    I have set up a query showing who is logged on. Basically, I want to add the total of users to set a mximum amount of users who can be logged on. For example, if their license has a maximum of 3 users, once three non administrators are logged on, the value will be 3 and I can then set up code to block any more users from logging on. Administrators are set to 0 so that they do not impact on how many users can log on

    Is there a way of adding up the total value of UserCount in the query? Maybe using a Dlookup?
    Cheers.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    DSum() would sum up your values, or open a recordset on an SQL statement that counted/summed them up.
    Paul

  3. #3
    Join Date
    Aug 2005
    Posts
    196
    I'll give both a try in the office tommorow - many thanks for your help.

  4. #4
    Join Date
    Apr 2006
    Posts
    157
    just a thought,

    how would you account for users that are unable to log-off properly, say system crashes or they just pressed close on the access appli/ or maybe alt-f4 accidentally
    Only quitters quit!

  5. #5
    Join Date
    Aug 2005
    Posts
    196
    Good question - Perhaps there's a way of measuring inactivity? There must be a better way than having to contact an administrator to log you off!

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes there is
    as you are developing this "security" code then its up to you

    you could make a guess that after so many minutes inactivity that a person was no longer logged on (ie store the date/time the person last used the app.)

    in essence the world is your oyster, as its your app.

    if you are using workgroup security (and if you are using Access so there is a defato workgroup security model being used) you can query the JET locking file (<accessmdbfilename>.ldb to find out who is connected to the app, using what computer. The code I use for that comes from the Access 2000 Developer/Enterprise books using code copyrighted by the authors.. but If you search hard enough on the web you will find it or an equivalent mechanism.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •