If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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.

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.