Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exit Access and Automatically Log Off User

Status
Not open for further replies.

Chew407

Technical User
Mar 28, 2005
92
CA
I have had an issue with users forgetting to log off on their laptops when their shift is over causing the computer to become locked. A password is then needed to unlock it. This prevents the next person on shift from using the laptop. Is it possible to automatically log off a user after exiting Access?
 
It is always a good idea to look at recent posts:
Close Access After Set Time Peroid
thread702-1301504
 
Remou,

I think Chew is looking for a way to force a Windows logoff when the database closes.

It may be possible, but I don't know how...Kind of seems that it wouldn't work though, because your code would have to initiated a Windows API function of some sort while it is still open, which will cause other errors/application hangs.

You may be able to create a VBScript or something that has a delay/sleep event, and have the Access app kick this off at close...then a couple seconds later the VBScript continues...but what happens if the Access app hangs on closing or has some other issue???

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
A password is then needed to unlock it.

Hold down the power button until it shuts down, then reboot it.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
mstrmage1768,
That's exactly what I am trying to do and I figured I would run into the problems you brought up. I also thought it might be possible to CLOSE the database and then initiate the necessary code to log off the user while Access is still running but perhaps this may still result in hanging.
 
I am not an expert in VBScripting by any means, but perhaps you can ask someone in one of those forums for some more help.

You could look for something like I suggested - having Access kick on a script that pauses, let Access close, and then the script finishes - or maybe even have a script that Access kicks off when it starts, and checks every so often to see if Access is still running. If it is not, shut the PC down.

I know this can be down with VB script...I just am not versed enough in it to help.

Good Luck!

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Hi...

ShutGUI.exe is available from Microsoft for free.

Put ShutGUI.exe in the same directory as your database.

Start you Access program from a batch file with the following:

echo off
YourAccessProgam.mdb
ShutGUI.exe

This will cause the machine to reboot when the Access.mdb is shutdown.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top