Tip of the Month (May 2008) Password Protecting Your Form Built into Visual CE is a simple password protection mechanism for forms. You can build a password into the form and, in order to use the form, the user has to enter the password. You use FORM | PASSWORD to set this up. However, you may want to do more sophisticated password protection, where the user needs to enter a username and password. Here's how to set that up. You will need a table, PASSWORD, with two columns: USER_NAME and USER_PASSWORD. Create an index on USER_NAME. Create a form. When asked what database to use, specify "no underlying database". The form will have the following controls:
On your form, you also need a macro to verify the user's identity. Select EDIT | MACROS/EVENTS and create a macro called LOGIN. The macro will have 4 steps:
When the form runs, the uer will enter a user name and password and press the LOGIN button. The form will lookup the password for the user in the PASSWORD table and compare it to the one the user entered. If they match, your form will be launched. Otherwise, an error will be displayed. Previous Tips of the Month |