473,561 Members | 3,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restrict FE application to one user at a time

One of my clients has asked me to make a change to one of their Access
applications.

The application is a Front End/Back End standard app. I didn't
develop it, but looking at it tells me that it was done entirely using
the Wizards. There is no log-in procedure.

They want to amend it so that only one person can be logged in at any
one time. So, if Joe Bloggs tries to open the application, and Fred
Jones has already connected, Joe Bloggs will see a message saying
"System exlusively opened by Fred Jones. Please try later" or
something like that, and Access would then close.

My first thought is as follows.

Create a Users table matching users to their network name.

Create a LoggedIn table to store details of the logged-in user. This
table would only ever have one row. Once the user had finished their
work and closed the app., the row would be deleted.

If a user tried to connect, the application would simply check for the
existence of a row in this LoggedIn table.

My one concern is to ensure that the row is ALWAYS deleted however the
user exits the application - has anyone had any experience with this
and any thoughts about possible pitfalls? There's only enough money
for one day's work, so I'm not interested in gold-plating.

TIA

Edward

Mar 12 '07 #1
17 3897
<te********@hot mail.comwrote in message
news:11******** *************@h 3g2000cwc.googl egroups.com...
>
They want to amend it so that only one person can be logged in at any
one time. So, if Joe Bloggs tries to open the application, and Fred
Jones has already connected, Joe Bloggs will see a message saying
"System exlusively opened by Fred Jones. Please try later" or
something like that, and Access would then close.
I think this is achievable by checking the default open mode to "Exclusive"
under Tools, Options, Advanced.

Keith.
www.keithwilby.com
Mar 12 '07 #2
On 12 Mar, 15:43, "Keith Wilby" <h...@there.com wrote:
<teddysn...@hot mail.comwrote in message

news:11******** *************@h 3g2000cwc.googl egroups.com...
They want to amend it so that only one person can be logged in at any
one time. So, if Joe Bloggs tries to open the application, and Fred
Jones has already connected, Joe Bloggs will see a message saying
"System exlusively opened by Fred Jones. Please try later" or
something like that, and Access would then close.

I think this is achievable by checking the default open mode to "Exclusive"
under Tools, Options, Advanced.
Hi Keith

I've finally got around to testing this.

I created a dummy back-end with a single table and, as you suggested,
set the default open mode to "Exclusive" . I moved this database to a
location on our network.

I also created a dummy front-end linked to the dummy back-end, also
setting the default open mode to "Exclusive" . I sent a copy to a
colleague and we were both able to open the front-ends
simulataneously , editing the data ad lib.

Any thoughts?

Edward

Apr 30 '07 #3

<te********@hot mail.comwrote in message
news:11******** **************@ c35g2000hsg.goo glegroups.com.. .
I've finally got around to testing this.

I created a dummy back-end with a single table and, as you suggested,
set the default open mode to "Exclusive" . I moved this database to a
location on our network.

I also created a dummy front-end linked to the dummy back-end, also
setting the default open mode to "Exclusive" . I sent a copy to a
colleague and we were both able to open the front-ends
simulataneously , editing the data ad lib.

Any thoughts?
That setting is for your installation of Access, not for the individual file you
currently are opening. I'm also pretty sure that it only affects front ends,
not back ends.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Apr 30 '07 #4

<te********@hot mail.comwrote in message
news:11******** **************@ c35g2000hsg.goo glegroups.com.. .
On 12 Mar, 15:43, "Keith Wilby" <h...@there.com wrote:
<teddysn...@hot mail.comwrote in message

news:11******** *************@h 3g2000cwc.googl egroups.com...
They want to amend it so that only one person can be logged in at any
one time. So, if Joe Bloggs tries to open the application, and Fred
Jones has already connected, Joe Bloggs will see a message saying
"System exlusively opened by Fred Jones. Please try later" or
something like that, and Access would then close.
I think this is achievable by checking the default open mode to
"Exclusive"
under Tools, Options, Advanced.

Hi Keith

I've finally got around to testing this.

I created a dummy back-end with a single table and, as you suggested,
set the default open mode to "Exclusive" . I moved this database to a
location on our network.

I also created a dummy front-end linked to the dummy back-end, also
setting the default open mode to "Exclusive" . I sent a copy to a
colleague and we were both able to open the front-ends
simulataneously , editing the data ad lib.

Any thoughts?

Edward
The "Exclusive" setting is for the front end. You could try opening the back
end tables and place a lock on the tables using VBA code in the front end.
Apr 30 '07 #5
Bri
te********@hotm ail.com wrote:
Hi Keith

I've finally got around to testing this.

I created a dummy back-end with a single table and, as you suggested,
set the default open mode to "Exclusive" . I moved this database to a
location on our network.

I also created a dummy front-end linked to the dummy back-end, also
setting the default open mode to "Exclusive" . I sent a copy to a
colleague and we were both able to open the front-ends
simulataneously , editing the data ad lib.

Any thoughts?

Edward

Your colleague is opening a copy not the same frontend that you have
open. The Exclusive pertains only to the opening of a specific MDB. Also
as mentioned, linking to a backend does not 'open' the backend in the
same sense that opening it directly. In other words, the Exclusive does
not get triggered by the link.

To do what you want, you need to have only one frontend that all users
open and have that set to Exclusive. Or use code to keep track of when
someone opens the FE and not allow anyone else in (dangerous because
what happens if the frontend is terminated abnormally before it can
'logout'?)

A better question would be 'Why can only one person be in the app at one
time?" I can't see why this would be wanted or necessary.

--
Bri
Apr 30 '07 #6
On 30 Apr, 20:09, Bri <n...@here.comw rote:
[...]
To do what you want, you need to have only one frontend that all users
open and have that set to Exclusive. Or use code to keep track of when
someone opens the FE and not allow anyone else in (dangerous because
what happens if the frontend is terminated abnormally before it can
'logout'?)
I'm taking a different approach - I'm searching for the existence of
the locking file for the backend - if it exists, then the application
informs the user that there's another person attached to the database
and exits. Now I have the problem of how to do this, but I've got a
cunning plan....
A better question would be 'Why can only one person be in the app at one
time?" I can't see why this would be wanted or necessary.
Neither can I, but I'm not the client ;¬}

May 1 '07 #7
Bri
te********@hotm ail.com wrote:
On 30 Apr, 20:09, Bri <n...@here.comw rote:
[...]
>To do what you want, you need to have only one frontend that all users
open and have that set to Exclusive. Or use code to keep track of when
someone opens the FE and not allow anyone else in (dangerous because
what happens if the frontend is terminated abnormally before it can
'logout'?)

I'm taking a different approach - I'm searching for the existence of
the locking file for the backend - if it exists, then the application
informs the user that there's another person attached to the database
and exits. Now I have the problem of how to do this, but I've got a
cunning plan....
Checking for the existence of the LDB file is easy. Just use the DIR
function. A fan of Blackadder are we? :D
>A better question would be 'Why can only one person be in the app at one
time?" I can't see why this would be wanted or necessary.

Neither can I, but I'm not the client ;¬}
Ah, clients, always wanting what they don't need because they don't know
better. :) If you can determine why they think they need exclusive use,
perhaps you can suggest a different solution.

--
Bri
May 1 '07 #8
Hi, Edward.
They want to amend it so that only one person can be logged in at any
one time.
From other replies in this thread, it sounds like your database is split, as
it should be for a multiuser database. To make it single user, delete the
links to the tables in the front end, and import the tables and
relationships into the front end. Store this file on the network in a
shared directory, but place all the database application users in a Windows
Group that only has read and modify permissions on this directory. No one
else besides Windows Administrators should have access rights to this
directory.

Now, when one user opens the database on the network, he won't have
permission to create an LDB file, which means the database file can't be
opened for shared mode. Any other user who tries to open it at the same
time will be given an error message that user 'Admin' has the file opened
exclusively.

Therefore, it's now only able to be opened exclusively by a single user at a
time.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
<te********@hot mail.comwrote in message
news:11******** *************@h 3g2000cwc.googl egroups.com...
One of my clients has asked me to make a change to one of their Access
applications.

The application is a Front End/Back End standard app. I didn't
develop it, but looking at it tells me that it was done entirely using
the Wizards. There is no log-in procedure.

They want to amend it so that only one person can be logged in at any
one time. So, if Joe Bloggs tries to open the application, and Fred
Jones has already connected, Joe Bloggs will see a message saying
"System exlusively opened by Fred Jones. Please try later" or
something like that, and Access would then close.

My first thought is as follows.

Create a Users table matching users to their network name.

Create a LoggedIn table to store details of the logged-in user. This
table would only ever have one row. Once the user had finished their
work and closed the app., the row would be deleted.

If a user tried to connect, the application would simply check for the
existence of a row in this LoggedIn table.

My one concern is to ensure that the row is ALWAYS deleted however the
user exits the application - has anyone had any experience with this
and any thoughts about possible pitfalls? There's only enough money
for one day's work, so I'm not interested in gold-plating.

TIA

Edward

May 1 '07 #9
On 1 May, 08:22, Bri <n...@here.comw rote:
teddysn...@hotm ail.com wrote:
[...]
I'm taking a different approach - I'm searching for the existence of
the locking file for the backend - if it exists, then the application
informs the user that there's another person attached to the database
and exits. Now I have the problem of how to do this, but I've got a
cunning plan....

Checking for the existence of the LDB file is easy. Just use the DIR
function. A fan of Blackadder are we? :D
I am a fan (how DID you guess, Mistress Ploppy?), and my plan involved
searching for the existence of the LDB file. It was all going so well
until.....
A better question would be 'Why can only one person be in the app at one
time?" I can't see why this would be wanted or necessary.
Neither can I, but I'm not the client ;¬}

Ah, clients, always wanting what they don't need because they don't know
better. :) If you can determine why they think they need exclusive use,
perhaps you can suggest a different solution.
When I called them and told them what I'd done, they changed the
position of the goalposts. They need to know *who* is logged on. So
it's back to the potentially error-prone table-with-single-row-
containing-username-of-logged-in-user-which-is-fine-until-Access-barfs-
at-which-time-the-table-won't-be-emptied-and-someone-will-have-to-go-
into-the-backend-and-clean-out-the-sludge.

Thanks one and all. Very good level of help and response round here.
My ISP could take a lesson from you people.

Edward

May 1 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2328
by: Terabyte | last post by:
I have a client that wants me to create a form that will contain about 50 condo listings. He wants me to place a restriction on the form as to the number of Condo listings a user can select/request. Is that possible? If so, what will I need to do or use to make this stunt possible? The items on each page would be different. The data is being...
3
3117
by: Paul | last post by:
Hi all, at present I I've built a website which can be updated by admin and users. My problem, I've combined "log in" and "access levels" to restrict access to certain pages, using the built in "log in" and "user authentication, restrict access to page" features. But I find the after login I constantly get redirected from the restricted...
4
4338
by: Neil Coleclough | last post by:
I am constructing a database to process product returns for my Company. I have a number of toggle buttons to identify the stage to which each return has been processed. For example, clicking the first button confirms that the goods are now in our building awaiting initial processing. This button then fires off an email to our warehouse staff...
2
2417
by: Calvin KD | last post by:
Hi everyone, Can someone suggest a way of monitoring the number of logins for each user in a particular session to make sure that a particular user cannot log in twice in the same session? I have thought of using Application-level counter or even store the counter in the database but it will not work (100% of the time that is) when the user's...
2
1860
by: ad | last post by:
I use Login control's Authenticate event to authenticate use. I find that different users can use the same ID to login in the same time. How can I restrict that the some ID can only login once in the some time
5
2953
by: toddles666 | last post by:
Hi- Is there any way of restricting access to a database by application & account? For example, I only want the application APP1 to access the database using the USER1 account. I've tried to use the DB2 Governor to do this, but it seems it always allows the the first query to be processed before forcing the connection. Here is my db2gov...
2
1335
by: sudhaoncyberworld | last post by:
Hi Techies, I have created Setup & Deployment project and installing a windows application from that. Now i want to restrict the user to install my application only upto 3 times. After that it should prompt to the user to download again from the site. Can anyone guide me in this.
10
13055
by: shankhar | last post by:
Hi all, In my project there is a requirement. If a user logged in at a time since he/she logged out others are not allowed to loggin using the same user name. That is to avoid multiple logins using a account. How to do this? I had got a idea and implemented. 1. When a user logs in storing the username, ip, login time to db.
17
4775
by: yuvang | last post by:
Hi all I have a mdb with login name and password form. There are several login names, i defined through a table "User_login". Here the problem is at a time a single user is able to login in multible system, which i want to restrict. here is the code which i i am using for login check..... Private Sub cmblogin_Click() Static...
0
7639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8074
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7608
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5465
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5181
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3594
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
885
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.