By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,705 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,705 IT Pros & Developers. It's quick & easy.

"Lock Computer" affect on MS Access applications

P: 4
I apologize in advance for the length of this posting and will attempt to simplify as much as possible.

I have an automation application in MS Access which generates reports in Excel and emails them to appropriate distribution lists. The application's automation is basically a timer which checks the current system time and the next report generation time. For example, Daily Report A has a next generation time of 8:00AM on 1/9/2008. When the timer (current time) reaches the specified time it creates the report and emails it.

This works perfectly as long as the computer remains unlocked. Meaning no screen savers are turned on and the computer is not "locked". If I remote VPN in to the machine the machine is automatically locked locally. Upon closing the remote VPN connection the local computer remains "locked". The applications timer seems to continue working correctly but when it hits the time to perform functions it stops. If I then locally "unlock" the computer it continues processing as normal. Is there any way to get around this issue? Any way to make the application continue regardless if the computer is locked or unlocked? I have always hated the idea of leaving the machine logged in and unlocked (inherited the application with the job) but have not found a way around this issue. Any assistance is appreciated.

Thanks.

Computer specs:
OS - Windows XP Professional SP2
Processor - 3GHz Celeron
RAM - 2GB
MS Access - 2003
Jan 8 '08 #1
Share this Question
Share on Google+
7 Replies


puppydogbuddy
Expert 100+
P: 1,923
I apologize in advance for the length of this posting and will attempt to simplify as much as possible.

I have an automation application in MS Access which generates reports in Excel and emails them to appropriate distribution lists. The application's automation is basically a timer which checks the current system time and the next report generation time. For example, Daily Report A has a next generation time of 8:00AM on 1/9/2008. When the timer (current time) reaches the specified time it creates the report and emails it.

This works perfectly as long as the computer remains unlocked. Meaning no screen savers are turned on and the computer is not "locked". If I remote VPN in to the machine the machine is automatically locked locally. Upon closing the remote VPN connection the local computer remains "locked". The applications timer seems to continue working correctly but when it hits the time to perform functions it stops. If I then locally "unlock" the computer it continues processing as normal. Is there any way to get around this issue? Any way to make the application continue regardless if the computer is locked or unlocked? I have always hated the idea of leaving the machine logged in and unlocked (inherited the application with the job) but have not found a way around this issue. Any assistance is appreciated.

Thanks.

Computer specs:
OS - Windows XP Professional SP2
Processor - 3GHz Celeron
RAM - 2GB
MS Access - 2003
Have you tried using the winXP scheduler to execute a macro at the set time instead of the Access Timer; the idea being that it is part of the operating system, external to the application, and therefore logicallly seems to be in a stronger position to control the locking/unlocking of the machine (which is an OS function)..
Jan 8 '08 #2

P: 4
Have you tried using the winXP scheduler to execute a macro at the set time instead of the Access Timer; the idea being that it is part of the operating system, external to the application, and therefore logicallly seems to be in a stronger position to control the locking/unlocking of the machine (which is an OS function)..

No, I have not tried that but it would not be a feasible option. The Access application that runs is a dashboard containg many, many reports which are generated based on the timer in relation to their scheduled run time record in a table. These reports are scheduled for different times and intervals.
Jan 11 '08 #3

puppydogbuddy
Expert 100+
P: 1,923
No, I have not tried that but it would not be a feasible option. The Access application that runs is a dashboard containg many, many reports which are generated based on the timer in relation to their scheduled run time record in a table. These reports are scheduled for different times and intervals.
Then the only I can tell is to check these links;compare them with your code, and see if maybe there is some code or commands that will help.


http://support.microsoft.com/kb/282866

http://support.microsoft.com/kb/314999
Jan 12 '08 #4

P: 4
Then the only I can tell is to check these links;compare them with your code, and see if maybe there is some code or commands that will help.


http://support.microsoft.com/kb/282866

http://support.microsoft.com/kb/314999

I m not sure you understand my question/problem as neither of the links you posted would have any bearing on it. The links you posted were how to auto-logon and how to force quit applications. I am not trying to do either of those things. I have no problem being logged in to the machine but would like to be able to lock it and have the code continue to execute as normal.
Jan 14 '08 #5

puppydogbuddy
Expert 100+
P: 1,923
I m not sure you understand my question/problem as neither of the links you posted would have any bearing on it. The links you posted were how to auto-logon and how to force quit applications. I am not trying to do either of those things. I have no problem being logged in to the machine but would like to be able to lock it and have the code continue to execute as normal.
I did not misunderstand you. In my opinion. if you are not willing to consider the Windows Task Manager, your solution lies in finding API code that will enable you to unlock the workstation when called by your timer code. This would enable your routine to run, and then the workstation can be locked or shut down again via code. I thought the links I gave you had some API calls that you might be able to use.

I've done additional research for API that you might be able to use. See these links.

http://blogs.msdn.com/brad_mccabe/ar...02/383544.aspx
# re: Locking the Computer from Code @ Friday, March 18, 2005 11:32 AM
Hey there,

I need to implement some sort of feature that will allow me to shut down an MS Access / VB application when the workstation on which the app is running is *locked*. I haven't had a lot of success getting the On Timer event to work while the workstation is locked, and I wonder if you had any ideas on how to do this progammatically (i.e. without getting the net techs to manually end the tasks on the workstations).

I've been researching this for about a year so any feedback would be highly appreciated. Thanks!


http://msmvps.com/blogs/alunj/archiv...ck-part-2.aspx

Even though there's no API call to do it, it is possible to unlock the workstation programmatically by emulating entering the password. I made a similar application that does this by connecting to an UltraVNC server service on the same host and sending mouse and keystroke events to enter the password. Alas, I have no hardware for proximity detection, so my application uses the removal and insertion of a USB drive holding a key file.


http://www.download32.com/shutdown-r...x--i10678.html
ActiveX costs $50
Jan 14 '08 #6

P: 4
I did not misunderstand you. In my opinion. if you are not willing to consider the Windows Task Manager, your solution lies in finding API code that will enable you to unlock the workstation when called by your timer code. This would enable your routine to run, and then the workstation can be locked or shut down again via code. I thought the links I gave you had some API calls that you might be able to use.

I've done additional research for API that you might be able to use. See these links.

http://blogs.msdn.com/brad_mccabe/ar...02/383544.aspx
# re: Locking the Computer from Code @ Friday, March 18, 2005 11:32 AM
Hey there,

I need to implement some sort of feature that will allow me to shut down an MS Access / VB application when the workstation on which the app is running is *locked*. I haven't had a lot of success getting the On Timer event to work while the workstation is locked, and I wonder if you had any ideas on how to do this progammatically (i.e. without getting the net techs to manually end the tasks on the workstations).

I've been researching this for about a year so any feedback would be highly appreciated. Thanks!


http://msmvps.com/blogs/alunj/archiv...ck-part-2.aspx

Even though there's no API call to do it, it is possible to unlock the workstation programmatically by emulating entering the password. I made a similar application that does this by connecting to an UltraVNC server service on the same host and sending mouse and keystroke events to enter the password. Alas, I have no hardware for proximity detection, so my application uses the removal and insertion of a USB drive holding a key file.


http://www.download32.com/shutdown-r...x--i10678.html
ActiveX costs $50

I understand now what your line of thinking on the issue was and it is an interesting concept. I am not sure if it will work for what I need though. If I could write code that would unlock the machine at the desired time then I would not have the problem I have already. The timer continues to run and then the app stops if the pc is locked at the point where code needs to execute. So, I don't see how I could write code to unlock the pc if the other code doesn't run.
Jan 15 '08 #7

puppydogbuddy
Expert 100+
P: 1,923
I understand now what your line of thinking on the issue was and it is an interesting concept. I am not sure if it will work for what I need though. If I could write code that would unlock the machine at the desired time then I would not have the problem I have already. The timer continues to run and then the app stops if the pc is locked at the point where code needs to execute. So, I don't see how I could write code to unlock the pc if the other code doesn't run.
The code to unlock your pc would be executed by the windows task manger since it is strictly an OS function. Once your pc is unlocked, your Access
code could then run.
Jan 15 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.