In this instance, a macro group containing conditions is created to verify the password. If the password is correct, close the identity check window and open another form; if the password is incorrect, a message box is displayed asking you to enter the password again. Create a form and add a text box named "administrator password" to receive the password entered by the user. Recreate
In this instance, a macro group containing conditions is created to verify the password. If the password is correct, close the identity check window and open another form; if the password is incorrect, a message box is displayed asking you to enter the password again. Create a form and add a text box named "administrator password" to receive the password entered by the user. Recreate
In this instance, a macro group containing conditions is created to verify the password. If the password is correct, close the identity check window and open another form; if the password is incorrect, a message box is displayed asking you to enter the password again.
Create a form, add a text box, and name it "administrator password" to receive the password entered by the user. Create a confirmation button and a Cancel button.
Create a macro group for the button. The macro design view is shown in.
Ellipsis (…) in the "condition" column (...), This indicates that these operations can be performed consecutively when the condition is true.
This is the result of the form operation.
When the entered password is incorrect, click OK to display a message box "Incorrect password.
In this example, the administrator password is defined as "system", which is not feasible in actual applications, because the password will be changed at any time as needed. To implement this function, you can first create a user table, which stores the user password, and use the user input password in the macro to compare it with the password in the User table. If you want to change the password, you can change the table data.