Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Record Locking - Disconnect Users

0 views
Skip to first unread message

Jomani

unread,
Jan 23, 2009, 5:55:01 PM1/23/09
to
I have a split Access 2000 database with the backend out on a remote server.
This database is accessible by dozens of users 24/7. I routinely run a
process that archives data and renames and/or recreates a couple of different
tables. In order to accomplish this I first have to make sure that everyone
is out of the program. Is there an easy way to disconnect users who have
inadvertently left the program running?

Albert D. Kallal

unread,
Jan 23, 2009, 7:00:31 PM1/23/09
to
"Jomani" <Jom...@discussions.microsoft.com> wrote in message
news:DC8A486F-F9CD-424B...@microsoft.com...

There not an easy way..but, I do use the following example to kick users out
after 2, or was it 3 hours of doing nothing:


a2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;210297

The above assumes your application does not have a lot of dialog boxes and
nag things that ask "do you want to save" type prompts....


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOO...@msn.com


Larry Linson

unread,
Jan 24, 2009, 11:59:20 PM1/24/09
to
You can include a "communication" table (I've used a separate one, or a
record in a "SysInfo" table), and from an "administrator ID" set an
indicator that all users must logoff by a particular date and time... have
code in each user's database, triggered by a timer, that checks, gives the
user a warning at intervals you think are adequate, but if the application
is still running when the time arrives, issue a DoCmd.Quit to
unceremoniously dump them off. That will get everyone, excep users whose
application is locked up by having a modal form (e.g., popup dialog, or a
MsgBox) displayed in which case code will not run.

I have done this, and it worked well enough that a few users who ignored the
"log off now" warnings came complaining about "the system just threw me
off". The client's system administrator wasn't very sympathetic. Oh, by
the way, use your own "log off" warnings, not a MsgBox, or _you_ will lock
up any users copy which is just sitting idle.

Larry Linson
Microsoft Office Access MVP


"Albert D. Kallal" <PleaseNOOO...@msn.com> wrote in message
news:O0%230Gbbf...@TK2MSFTNGP02.phx.gbl...

Keith Wilby

unread,
Jan 26, 2009, 4:22:42 AM1/26/09
to
"Larry Linson" <bou...@localhost.not> wrote in message
news:eQj3omqf...@TK2MSFTNGP05.phx.gbl...

> issue a DoCmd.Quit to unceremoniously dump them off.

Hi Larry. Shouldn't that be Application.Quit?

Keith.

Larry Linson

unread,
Jan 26, 2009, 4:06:44 PM1/26/09
to
"Keith Wilby" <he...@there.com> wrote

> "Larry Linson" <bou...@localhost.not> wrote

>> issue a DoCmd.Quit to unceremoniously dump them off.
>
> Hi Larry. Shouldn't that be Application.Quit?

Either one works just fine for me... in Access 2003 and previous versions.
In fact, the Command Button Wizard generates "DoCmd.Quit".

Larry


Keith Wilby

unread,
Jan 27, 2009, 8:57:47 AM1/27/09
to
"Larry Linson" <bou...@localhost.not> wrote in message
news:ujaf1n$fJHA...@TK2MSFTNGP05.phx.gbl...

I realise that it works but ...

"The Quit method of the DoCmd object was added to provide backward
compatibility for running the Quit action in Visual Basic code in Microsoft
Access 95. It's recommended that you use the existing Quit method of the
Application object instead."

http://msdn.microsoft.com/en-us/library/bb238948.aspx

It doesn't however explain *why*.

Keith.

Larry Linson

unread,
Jan 29, 2009, 12:50:18 AM1/29/09
to
"Keith Wilby" <he...@there.com> wrote

> I realise that it works but ...
>
> "The Quit method of the DoCmd object was added to provide backward
> compatibility for running the Quit action in Visual Basic code in
Microsoft
> Access 95. It's recommended that you use the existing Quit method of the
> Application object instead."
>
> http://msdn.microsoft.com/en-us/library/bb238948.aspx
>
> It doesn't however explain *why*.

When they do give me a good reason, I might change.

Larry


Keith Wilby

unread,
Jan 30, 2009, 5:17:49 AM1/30/09
to
"Larry Linson" <bou...@localhost.not> wrote in message
news:%23zFr1Vd...@TK2MSFTNGP04.phx.gbl...

>
> When they do give me a good reason, I might change.
>

Having done a little research (thanks to the guys on utteraccess.com forum)
it appears that DoCmd.Quit is the more reliable of the pair.

kailubbe

unread,
Oct 6, 2009, 6:22:44 PM10/6/09
to
Larry - What do you mean when you say "use your own log off warnings"? What options other than msgboxes are there?

________________________
Ignorant, but eager to learn.

Larry Linson wrote:

Re: Record Locking - Disconnect Users
24-Jan-09

You can include a "communication" table (I've used a separate one, or a
record in a "SysInfo" table), and from an "administrator ID" set an
indicator that all users must logoff by a particular date and time... have
code in each user's database, triggered by a timer, that checks, gives the
user a warning at intervals you think are adequate, but if the application
is still running when the time arrives, issue a DoCmd.Quit to
unceremoniously dump them off. That will get everyone, excep users whose
application is locked up by having a modal form (e.g., popup dialog, or a
MsgBox) displayed in which case code will not run.

I have done this, and it worked well enough that a few users who ignored the
"log off now" warnings came complaining about "the system just threw me
off". The client's system administrator wasn't very sympathetic. Oh, by
the way, use your own "log off" warnings, not a MsgBox, or _you_ will lock
up any users copy which is just sitting idle.

Larry Linson
Microsoft Office Access MVP


"Albert D. Kallal" <PleaseNOOO...@msn.com> wrote in message
news:O0%230Gbbf...@TK2MSFTNGP02.phx.gbl...

EggHeadCafe - Software Developer Portal of Choice
COM+ Services Overhead in .NET
http://www.eggheadcafe.com/tutorials/aspnet/aab197cf-64da-4233-9819-02edbea0e9fb/com-services-overhead-in.aspx

kailubbe

unread,
Oct 6, 2009, 6:25:36 PM10/6/09
to
I think i just thought of the answer - a non-modal form would work, right?

Kai Lubbe wrote:

Alternative to msgbox
06-Oct-09

Larry - What do you mean when you say "use your own log off warnings"? What options other than msgboxes are there?

________________________
Ignorant, but eager to learn.

EggHeadCafe - Software Developer Portal of Choice
ASP.NET: Using SQLite with Enterprise Library 3.1
http://www.eggheadcafe.com/tutorials/aspnet/ba7ea7a0-4e67-4863-941c-f4dadf9b7127/aspnet-using-sqlite-wit.aspx

0 new messages