Remote Desktop Issue (2 Viewers)

rede96

Registered User.
Local time
Today, 18:14
Joined
Apr 2, 2004
Messages
134
I have a stand alone PC that is connected to the local network. I have an access database that I use for running some update tasks over night. Basically I open the database, set a time for a form onTimer event to trigger and leave it running. Then I lock the desktop and it will run every night no problem.

Sometimes I connect the to local PC from my laptop via Remote Desktop. I’d do what I needed to and disconnected. And the database would continue to run after a disconnected.

Now for some reason if I connect to the local pc using Remote Desktop, when I disconnect it stops the database from running! If I log back in using Remote Desktop at some point later the code in my database will start again and ‘catch up’ from the point I disconnected. But as soon as I disconnect all stops!

What’s changed!!

The only way I get this to run every night is to log into the local pc, set the database running and lock the screen. I can no longer Remote Desktop as it kills everything when I disconnect.

Can someone help please?
 

Minty

AWF VIP
Local time
Today, 18:14
Joined
Jul 26, 2013
Messages
10,355
There have been some security updates to RDP in the last 6 months, maybe a setting somewhere has changed and it's logging you out of the remote desktop rather than simply closing the RDP session?
 

rede96

Registered User.
Local time
Today, 18:14
Joined
Apr 2, 2004
Messages
134
There have been some security updates to RDP in the last 6 months, maybe a setting somewhere has changed and it's logging you out of the remote desktop rather than simply closing the RDP session?

Thanks for the reply. I did already check the session time out setting and changed them to never time out. But that didn’t work. It’s as if when I end the session everything on the pc just stops. Well my code in my database. So maybe it’s an office or access update? No idea really. But unless I open my database on the local pc then it just doesn’t work.
 

Minty

AWF VIP
Local time
Today, 18:14
Joined
Jul 26, 2013
Messages
10,355
To add to my other reply some users have managed to fix this by running

Code:
powercfg -h off

from the command line. No idea if that will fix your issue.
 

rede96

Registered User.
Local time
Today, 18:14
Joined
Apr 2, 2004
Messages
134
To add to my other reply some users have managed to fix this by running

Code:
powercfg -h off

from the command line. No idea if that will fix your issue.

Hi Again, sorry the late reply. Not been around for a few days.

Unfortunately that doesn't work. Tried a lot, but really can't figure it out. So guess I'll have to try and think of another appraoch.
 

isladogs

MVP / VIP
Local time
Today, 18:14
Joined
Jan 14, 2017
Messages
18,186
Try creating a scheduled task to run the overnight updates as an alternative approach.
Set the task to wake the computer if necessary at a specified time then to open your app so it runs a macro to perform the updates then quit the app when done.
I've used this approach for over a decade and remoting in to the workstation has never caused any issues with the task.
 
Last edited:

deletedT

Guest
Local time
Today, 18:14
Joined
Feb 2, 2019
Messages
1,218
Set the task to wake the computer if necessary at a specified time then to open your app so it runs a macro to perform the updates then quit the app when done.

What kind of update are we talking about? Windows? or Access? Why should it be done over night? Which version of windows? Are the updates from Microsoft so frequent and so lengthy that a daily or weekly schedule is necessary?
(Am I hi jacking the thread? :D)

My windows 10 recognizes the ideal time and depending on the necessary time, it chooses my lunch time or 3PM rest time or others to update itself. For much lengthy updates, it waits until I switch off the PC and leave the office. And I think it's been there since windows 7.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 18:14
Joined
Jan 14, 2017
Messages
18,186
What kind of update are we talking about? Windows? or Access? Why should it be done over night? Which version of windows? Are the updates from Microsoft so frequent and so lengthy that a daily or weekly schedule is necessary?
(Am I hi jacking the thread? :D)

Probably ... as you appear to be asking me rather than the OP ...;)

I'm talking about updating staff, student and school records in Access from an external database. Some of these updates involve changes and additions to a lot of tables using CSV files generated as part of the update. As a result it takes 30-45 minutes to complete during which time the main database needs to be locked from other users who can also use it remotely. So the task is done in the middle of the night.

I also run other scheduled tasks in the middle of the day where these can be done quickly without affecting end users. For example, importing am/pm attendance data twice daily.

If you want to continue this discussion I suggest its moved to a separate thread
 

rede96

Registered User.
Local time
Today, 18:14
Joined
Apr 2, 2004
Messages
134
Try creating a scheduled task to run the overnight updates as an alternative approach.
Set the task to wake the computer if necessary at a specified time then to open your app so it runs a macro to perform the updates then quit the app when done.
I've used this approach for over a decade and remoting in to the workstation has never caused any issues with the task.

I can create a task and it will open the database but the database won't run it's code. (From the on timer event on a form that opens with the database.)

The code works fine whilst im in the remote session. But as soon as I close the remote session it seems VBA just won't execute.

So possible a new Office or Windows security update?

EDIT: As soon as I re-connect to the remote desktop, the code starts to run.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 18:14
Joined
Jan 14, 2017
Messages
18,186
The approach has been working for me for over 10 years running different version of Access (2003/2010/2016/365) during that time

The scheduled task can either
a) open your Access database & run your code using a function from an autoexec macro
or
b) open Access using a macro command line switch to do the same thing!

I don't use a timer event on a form as you described

As the scheduled task is on the remote workstation, remoting in should have absolutely no effect on this process ...unless of course you shut down the workstation whilst connected remotely
 

rede96

Registered User.
Local time
Today, 18:14
Joined
Apr 2, 2004
Messages
134
The approach has been working for me for over 10 years running different version of Access (2003/2010/2016/365) during that time

The scheduled task can either
a) open your Access database & run your code using a function from an autoexec macro
or
b) open Access using a macro command line switch to do the same thing!

I don't use a timer event on a form as you described

As the scheduled task is on the remote workstation, remoting in should have absolutely no effect on this process ...unless of course you shut down the workstation whilst connected remotely

It’s been working for me for years too. Just suddenly stopped.

It doesn’t matter which method I use as I’ve tried the methods you describe. The problem is, as it appears, no vba code will run for an open database when the remote connection is closed. As soon as I reconnect, the code starts without me having to do anything. Very odd???
 

isladogs

MVP / VIP
Local time
Today, 18:14
Joined
Jan 14, 2017
Messages
18,186
Sorry. I'm out of ideas unless its a Windows update issue as previously described.
 

Users who are viewing this thread

Top Bottom