5. An instance of a macro--test password in this instance, you will create a macro group that will contain the criteria. Used to verify the password, if the password is correct, first close the Identity Check window, and then open another form, if the password is incorrect, the message box will require the password to re-enter.
Create a form, add a text box, and name it "Admin password" to receive the password that the user entered. Then create a OK button and a Cancel button.
Create a macro group for the button, and the macro Design view is as shown above. The ellipsis (...) in the criteria bar. That can be performed sequentially when the condition is true.
This is the effect of the form running. When the password you entered is incorrect, clicking the OK button will show a message box with an incorrect password. In this example, the admin password is defined as "system", which is not feasible in practical applications because the password is changed at any time because of the need. To achieve this, you can build a user table that holds the user's password and compares it with the password entered by the user in the macro and the password in the user's table. If you want to change the password, you can change the table's data.