In this instance, you will create a macro group that will contain the criteria to verify the password, and if the password is correct, close the Identity Check window first, and then open another form; If the password is incorrect, the message box will require the password to be entered again.
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 condition bar, which indicates that you can perform these operations 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.