Ok. I am sure that there are tons for this request. I am trying tor force that once you log on to the data base initially that you have to change the password. I currently have a table that has a generic password but want them to change it after the initial log on as I am sure that many will not want to change their password if they don't have to. I have created a change password form so they will be able to change their password any time.
Here is the code currently which is working other than not changing the password.
Private Sub Login_Click()
On Error GoTo Err_Login_Click
Dim varEvent As Variant
Dim stDocName As String
varEvent = DLookup("[UserType]", "[ID_PW_Check]")
If Not IsNull(varEvent) Then
stDocName = "Switchboard" & varEvent
DoCmd.Close acForm, "Login", acSaveNo
DoCmd.OpenForm stDocName
Else
MsgBox "User name not found or password is incorrect", vbInformation, "Warning"
End If
Exit_Login_Click:
Exit Sub
Err_Login_Click:
MsgBox Err.Description
Resume Exit_Login_Click
End Sub