Solved

Limit Number of Users in Microsoft Access

Posted on 2007-12-06
10
1,115 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
 
LVL 9

Expert Comment

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

mx
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now