[AccessD] Clean Shut Down of Access When Left Open in RDP

Jim Lawrence accessd at shaw.ca
Tue Aug 7 12:28:34 CDT 2018


Sorry, it is called the "Task Scheduler" in Microsoft vernacular. 

Many years ago I did run into some problems using this type of function, in MS Access but I may have configured it incorrectly. This may not be the best idea but I would be tempted to just "lock" the data file (administration over-ride), changing file to read-only and leave it at that. 

Use to do that when working late nights on a client's servers and all the users connection had not been closed. It may have confused some user who wondered what happened to the record they were working on, before they went on holidays but no data files ever became corrupted via a backup or reboot. 

Jim

----- Original Message -----
From: "Jim Dettman" <jimdettman at verizon.net>
To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com>
Sent: Tuesday, August 7, 2018 10:02:02 AM
Subject: Re: [AccessD] Clean Shut Down of Access When Left Open in RDP

I've never found it to be an issue.

 I check once a minute.   In the past, I just used to do a DCount() on a
table called tblAppShutdown.   If I found a record, I would start a
shutdown.  Later I generalized that into a pair of procedures and a single
table to hold locks for various resources such as the app, records,
printers, etc.  I've got an article on EE covering that.

 I'm not sure I understand the cron job; this is not something that can be
external to the app.  It boils down to every so often your app needs to
check for some type of flag, be it a field, record, file on disk, etc. and
if it finds it, starts a shutdown.

Jim.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim
Lawrence
Sent: Sunday, August 5, 2018 2:28 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Clean Shut Down of Access When Left Open in RDP

How great of impact does this have on the application's performance?

Can a server based cron job be used as it take very little resources and can
be centralized within the network?

Jim

----- Original Message -----
From: "Jim Dettman" <jimdettman at verizon.net>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Saturday, August 4, 2018 10:14:15 AM
Subject: Re: [AccessD] Clean Shut Down of Access When Left Open in RDP

Thing is, it doesn't have to be hooked to every form.

 Open a hidden form in the background, set a timer there, and check for a
shutdown flag once a minute.   Also monitor screen.activeform and
screen.activecontrol to check for activity:

https://msdn.microsoft.com/en-us/vba/access-vba/articles/detect-user-idle-ti
me-or-inactivity

 You can then loop through the forms collection and start closing them.

 The biggest problem however is how to handle a msgbox that is currently up.
Form add/edits you can easily un-do, but handling a popup dialog is a
problem.

Jim.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Bill Benson
Sent: Saturday, August 4, 2018 10:33 AM
To: John W. Colby
Cc: Access Developers discussion and problem solving
Subject: Re: [AccessD] Clean Shut Down of Access When Left Open in RDP

Yeah that is kinda funny... you're right as usual mr colby

On Sat, Aug 4, 2018, 10:09 AM John Colby <jwcolby at gmail.com> wrote:

>  >>In the interim, I would initiate a timer on the got focus of every
> control on every form that closes all forms and exits the database if a
> certain period of inactivity is reached.
>
> LOL, can you say "class"?
>
> On 8/1/2018 2:35 AM, Bill Benson wrote:
> > Why do we always have to "switch" from Access to another platform just
to
> > get *reasonable* robustness?
> >
> > This problem is well documented and there no known solution except less
> > than perfect mechanisms like Chris Symonds or Alvin Meyer KickThemOff
> > solutions, which still are not fool proof, from my viewpoint.
> >
> > Why doesn't MS implement a fix to a problem that has existed for 10 plus
> > years despite many requests for a fix?
> >
> > Fortunately in my corporate environment, the backend is always SQL
Server
> > or Sharepoint. A purely Access backend on a multi user platform is just
> > asking for trouble.
> >
> > In the interim, I would initiate a timer on the got focus of every
> control
> > on every form that closes all forms and exits the database if a certain
> > period of inactivity is reached. 30 minutes is usually adequate. No
> message
> > to the user, but a scrape of data can be sent to the user in an email
> > telling them which form (s) were open, what field data existed at time
of
> > forced exit, and a request to be more responsibe in future. Don't
> display a
> > "Database will close in XX minutes" messagebox, that will hang the
system
> > awaiting their response... but you can pop a dialog form on a timer,
> with a
> > label and a cancel button. When the timer on that form reaches its
preset
> > interval, the form closes and commences database exit routines. If their
> > data isn't saved, too bad.
> >
> > This has to be one of the most frustrating things in all of Access.
> >
> > On Wed, Aug 1, 2018, 1:01 AM Jim Lawrence <accessd at shaw.ca> wrote:
> >
> >> Has anyone looked at SSH or SSL connections as they are built into
> >> Window10 by default? Extremely robust and resilient.
> >>
> >> Maybe it might be better to setup remote users on SQL-Express DB BE as
> it
> >> does not require a synchronize connection like a MDB does.
> >>
> >> Aside: Ran into a similar problem many years ago and moved the entire
> >> network's BE to a MSSQL DB and that was an end to corruption issues.
> >>
> >> Jim
> >>
> >> ----- Original Message -----
> >> From: "David Emerson" <newsgrps at dalyn.co.nz>
> >> To: "Access Developers discussion and problem solving" <
> >> accessd at databaseadvisors.com>
> >> Sent: Tuesday, July 31, 2018 7:24:11 PM
> >> Subject: [AccessD] Clean Shut Down of Access When Left Open in RDP
> >>
> >> Hi Listers,
> >>
> >>
> >>
> >> A client has a problem with Access data corruption when a user on RDP
> >> leaves
> >> the Access application open and the users are forcibly logged off the
> RDS
> >> servers.
> >>
> >>
> >>
> >> Is there a way for Access to be closed first before the user is logged
> off?
> >>
> >>
> >>
> >> Regards
> >>
> >> David Emerson
> >> Dalyn Software Ltd
> >> Wellington, New Zealand
> >>
> >>
> >>
> >>
> >>
> >> --
> >> AccessD mailing list
> >> AccessD at databaseadvisors.com
> >> http://databaseadvisors.com/mailman/listinfo/accessd
> >> Website: http://www.databaseadvisors.com
> >> --
> >> AccessD mailing list
> >> AccessD at databaseadvisors.com
> >> http://databaseadvisors.com/mailman/listinfo/accessd
> >> Website: http://www.databaseadvisors.com
> >>
>
> --
> John W. Colby
>
>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list