Hi all,
I get this error 2585 This action can't be carried out while processing a form or report event. This happens when I enter a password into my form in order to open any other one. When the password is correct, I want it to open an administrator form, close the form (Main Start) which has the button to open the login form, and close the login form . However when the password is correct this error pops up and the login form does not close. Any help would be appreciated.
Private Sub txtPassword_LostFocus()
Dim PassWord As String
strPassword = "12345"
If Me.txtPassword = strPassword Then
DoCmd.OpenForm "Menuboard Admin"
DoCmd.Close acForm, "Menuboard Main Start"
DoCmd.Close acForm, "Menuboard Login"
Else
MsgBox ("You're not authorized for Administrator access.")
End If
End Sub
I get this error 2585 This action can't be carried out while processing a form or report event. This happens when I enter a password into my form in order to open any other one. When the password is correct, I want it to open an administrator form, close the form (Main Start) which has the button to open the login form, and close the login form . However when the password is correct this error pops up and the login form does not close. Any help would be appreciated.
Private Sub txtPassword_LostFocus()
Dim PassWord As String
strPassword = "12345"
If Me.txtPassword = strPassword Then
DoCmd.OpenForm "Menuboard Admin"
DoCmd.Close acForm, "Menuboard Main Start"
DoCmd.Close acForm, "Menuboard Login"
Else
MsgBox ("You're not authorized for Administrator access.")
End If
End Sub