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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock workstation in Access

Status
Not open for further replies.

hartwell

Technical User
Apr 18, 2005
80
GB
Is is possible to lock a workstation while in access on NT4?

was thinking more on the lines of sendkeys as

ReturnValue = Shell("c:\winnt\System32\rundll32.exe user32.dll,LockWorkStation", 0)

just wont work.
 
hartwell,
Paste the following into a standard code module:
Code:
Public Declare Sub LockWorkStation Lib "user32.dll" ()
Then you can call [tt]LockWorkstation[/tt] from any place in your code.

CMP
 
thanks for the tip, just hope it works under NT4 as most codes i have tried hasnt
 
and how do you unlock it???

[bigears]

Program Error
Programmers do it one finger at a time!
 
ProgramError - when the workstation is locked you get the same dialog as when pressing Ctrl+Alt+Del, Lock computer. Therefore depending on operating system either press Ctrl+Alt+Delete and type your password or just type your password.

Hope this helps.
 
sorry how would i implement this into the code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top