"Peter Russell" <ru***@127.0.0.1> wrote in message
news:me***********************@russellscott.btinte rnet.com...
ciuky2003 previously wrote:
How can I ask another time the password to a customer, after that he
has done login to a protected db?
Ciuky
You can't force the Access login to display again.
You could develop your own form to ask for it but that would be pointless
because you could not check it.
Peter Russell
you could not check it?
(...cracks aside) although you couldn't find out the password if you didn't
know it, you could check it to see if a given password was right or wrong -
although I can't see the point:
Public Sub CheckPassword()
On Error Resume Next
Dim wks As DAO.Workspace
Dim strUserName As String
Dim strPassword As String
strUserName = CurrentUser
strPassword = InputBox("What is your password?")
Set wks = DBEngine.CreateWorkspace("wksJET", strUserName, strPassword)
If Err.Number = 0 Then
MsgBox "Correct!", vbInformation
Else
MsgBox "Wrong!", vbCritical
End If
If Not wks Is Nothing Then
Set wks = Nothing
End If
End Sub
Fletcher