I really appreciate your quick response.
I used the following code in my main form on load event. The message box
pops up but the change password form does not. And I know the particular user
has not changed its password.
Is it some the following code that's the problem "advisorname = '" &
strtxtAdvisor & "' AND ChangePassword = False" or what.
Private Sub Form_Load()
Dim strtxtAdvisor As String
strtxtAdvisor = Me.txtAdvisorname
If (Not IsNothing(DLookup("advisorname", "tbladvisors", "advisorname = '" &
strtxtAdvisor & "' AND ChangePassword = False"))) Then
If vbYes = MsgBox("Please change your password", vbQuestion + vbYesNo,
gstrAppTitle) Then
' Open the Advisor password form
cmdPasswords_Click
Thanks