Solved

Limit Number of Users in Microsoft Access

Posted on 2007-12-06
10
1,122 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
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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.

786 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