I want to Prompt user to create a new password after their first login. Also it should be capable of looking by default password. for example. in table if password is "password" that it should prompt user to create a new password i, other than that no require to change password
How can i do that?
Here is the code what i m using for user to login
[/code]
Private Sub cmdlogin_Click()
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("Query1", dbOpenSnapshot, dbReadOnly)
rs.FindFirst "username = '" & Me.txtusername & "'"
If rs.NoMatch = True Then
Me.lblwrongusername.Visible = True
Me.txtusername.SetFocus
Exit Sub
End If
Me.lblwrongusername.Visible = False
TempVars("username").Value = Me.txtusername.Value
If rs!Password <> Encrypt(Me.txtpassword) Then
Me.lblwrongpassword.Visible = True
Me.txtpassword.SetFocus
Exit Sub
End If
Me.lblwrongpassword.Visible = False
TempVars("username").Value = Me.txtusername.Value
If rs![Acess type] = 1 Then
DoCmd.OpenForm "frmhomeadmin"
'DoCmd.close acForm, Me.Name
Me.Visible = False
[/code]