I have an extra field where the enter once again the password.
You might be able to change the code for your purpose.
' Check if password is correct:
' =============================
Const NOT_VALID_ACCOUNT_OR_PASSWORD = 3029
Dim wspUser As Workspace
Dim iFehler As Integer
' Check for correct password
On Error Resume Next
' Check, if old password is correct
Set wspUser = DBEngine.CreateWorkspace("wspPWD", Nz(Me![txt_USER]), Nz(Me![txt_Password]))
' This should work for you:
' Set wspUser = DBEngine.CreateWorkspace("wspPWD", CurrentUser(), "")
iFehler = Err.Number
wspUser.Close
On Error GoTo 0
If (iFehler = NOT_VALID_ACCOUNT_OR_PASSWORD) Then
KeyCode = 0
Me![txt_Password].SetFocus
MsgBox "Name or password is incorrect."
Exit Sub
End If
Please email to: roland.or...@THISstudbox.uni-stuttgart.de
================ (Please delete the DROP THIS) /;^;\
http://tick.informatik.uni-stuttgart.de/~ortlofrd/ ( o o )
-----------------------------------------------------oOOO--(_)--OOOo----