?
Solved

Limit Number of Users in Microsoft Access

Posted on 2007-12-06
10
Medium Priority
?
1,132 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
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!

 
LVL 75
ID: 20422382
Interesting link Tony.

mx
0
 
LVL 8

Accepted Solution

by:
dds110 earned 1500 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

770 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