Solved

Limit Number of Users in Microsoft Access

Posted on 2007-12-06
10
1,126 Views
Last Modified: 2008-02-05
I have a Microsoft Access front end connected to a Microsoft Accss backend. The back end is on a netowkr share. I would like to be able to limit the number of users that can connect to the back end to a certain number. How can I limit the number of users to my backend database?
0
Comment
Question by:AccessYourBiz_Com
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 20

Expert Comment

by:clarkscott
ID: 20422185
There's an Access Locking file is created when ever a user accesses an mdb.  It's called 'YourMDBName".ldb

If you open this ldb file using NotePad, the entries look like this.
XFG8J541                        Admin    

This shows a single user.  If more users, this will duplicate (not wrap around) for all users.
You could write a function that opens this file to read and string-input and dissect to determine number of users.

Scott C
0
 
LVL 75
ID: 20422200
There is no inherent way to do this.  However, you might be able to accomplish this using Tony's app launcher ... since each user opens the FE via this program ... and you may be able to keep track of how many users are in the back end.

http://www.granite.ab.ca/access/autofe.htm

Of course, you could devise some scheme looking at the LDB file and counting the number of active users - but you would still need a common entry point to lock out a user after the max had been reached.

Why do you want to do this?

mx
0
 
LVL 75
ID: 20422208
"You could write a function that opens this file to read and string-input and dissect to determine number of users."

But ... how would you keep the 'next' user from opening the frontend ?

mx
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:tonydemarco
ID: 20422347
0
 
LVL 75
ID: 20422382
Interesting link Tony.

mx
0
 
LVL 8

Accepted Solution

by:
dds110 earned 500 total points
ID: 20423507
create a new table to hold a count of users.  When the front-end is opened (assuming a form is opened) check the count and add 1 to it.  If the count is met, notify the user and then shut down that specific front end.  When the form is closed, decrement the count in the table by 1.

HTH

dds
0
 
LVL 3

Author Comment

by:AccessYourBiz_Com
ID: 20457439
I found this link to Microsoft about using a dll that is provided in this utility.
http://support.microsoft.com/kb/176670

I tried the example code and everthing seemed to work OK except when users were logging off. I limited the users to 3 and when all three users connected it would not let a fourth on. When I had one or two of the users log off I still was not able to connect even though there was only one user connected. I found that all the users had to disconnect from the back end in order for the ldb to clear out all the user information. Does anyone have any experiencing using this dll?
Thanks Again!!!
0
 
LVL 8

Expert Comment

by:dds110
ID: 20460819
The LDB, once opened, will always contain data for each user that has interacted with the database until all users have logged out.  In other words, if Joe logs in and then logs out while Sally is logged in, the LDB file will still contain entries for both Joe and Sally.  AFAIK, the LDB does not refresh.

Maybe someone can prove me wrong.
0
 
LVL 75
ID: 20460885
dds110

You are correct. The LDB will showed user who have logged in and then out as 'Suspect' = Yes and 'Logged On' = No.  whereas users currently logged in are the opposite.  Once the last person logs out, the LDB is cleared ... well, because it is deleted.

In your example I am Suspect because my name IS Joe :-)

mx
0
 
LVL 8

Expert Comment

by:dds110
ID: 20464649
So the LDB does refresh.  I learn something new everyday.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question