When I click on "Post Reply" button, I am asked to sign on. But, after I sign on the post "reply button" disappears.
The thread I want to answer is: http://bytes.com/topic/access/answer...ndows-password
It was a most amusing thread but no one ever posted a solution to the Author's question.
Here is my vba solution which I think is nearly foolproof, and guaranteed to not expose the computer to a brute force weakness.
Expand|Select|Wrap|Line Numbers
- Option Explicit
- Private Declare Function LockWorkStation Lib "user32.dll" () As Long
- Sub test()
- If UserVerifiedSecuredFunction Then
- MsgBox "Now running secured function"
- ' .... your code ...
- End If
- End Sub
- Function UserVerifiedSecuredFunction() As Boolean
- ' returns true if user has entered his Windows Logon password within 20 seconds
- ' returns false if user decides not to access the secured function, or does not respond with 20 seconds.
- Dim timeLocked As Date
- If vbOK = MsgBox("Do you want to access the secured function? If so, you must enter your windows password within 20 seconds.", vbOKCancel) Then
- timeLocked = now
- LockWorkStation
- If vbOK = MsgBox("Please click OK with 10 seconds to access the function, or Cancel to skip the function.", vbOKCancel) Then
- If now - timeLocked > 30 / 24 / 60 / 60 Then
- MsgBox "You did not verify credentials quickly enough."
- Else
- UserVerifiedSecuredFunction = True
- End If
- End If
- End If
- End Function