I've created my own security logon, were users are required to change their passwords after 30 days and if they are new. I can get everything running fine except the change password screen.
There are 3 textboxes, I want the system to verify the current password with the username then confirm both new passwords match, then make the relevant changes to the user logon table before return the user to the initial logon screen.
Below is the code I've currently used.
Private Sub CmdOK_Click()
If Not IsNull(Me.OpenArgs) Then
UserID = Me.OpenArgs
If txtPwd.Value = DLookup("strPassword", "tbluser", "[IntUser] = " & UserID) Then
If txtNewPwd = txtNewPwd2 Then
tbluser.password = txtNewPwd
tbluser.NewUser = 0
DoCmd.OpenForm "frmlogon", acNormal
MsgBox "New Passwords do not match!", vbExclamation, "Mismatch"
MsgBox "password does not match Current Password", vbExclamation, "Mismatch"