1 Reply Latest reply on Feb 5, 2015 4:36 AM by Mark_M

    Log in Form

    DanielJenkins

      Title

      Log in Form

      Post

       

      Hello,

      For my database, how would I create a form to be used as a log in? I understand I need a script that displays the login screen when the database is opened, but how do I create the password? I only require a password, no usernames.

      Thanks, Dan

       

        • 1. Re: Log in Form
          Mark_M

          >

          You can use the script step "Show Custom Dialog Box".

          However, the easier thing to do is setup under File > Manage > Security two different accounts.  "Admin" which has full rights (including design changes) and "User" (use any name that you then share with anyone) and assign it the Data Entry Only privilege set.  Give the Admin account a password and the User account a different password.  You give the user account information to  everyone else, but they cannot make changes to the structure of the database.  The user then supplies the user name and password to login.

          OR

          You can do it your way in the following manner:

                 
          1. Create a table for Globals (using global storage)
          2.      
          3. Create a field for "LoginPassword" on the Global Table
          4.      
          5. Create an opening script
          6.      
          7. In the opening script use the "Show Custom Dialog Box" script step, give it a title and instruction text.
          8.      
          9. Use the second tab for "Input Fields" and specify input field #1 is to be stored in the global field (you can even check the box to "use password character".
          10.      
          11. Use an IF statement to test if the inputted value in the global field equals the password you want.  If the password DOES NOT match, show a dialog box showing the error and then use the "Exit Application" step to close.  If the password does match, the IF statement does not return TRUE and the steps between "IF" and "END IF" are skipped.

          The problem with the second method though is that everyone that logs in has Admin privileges so they can make changes to table design, relationships, and layouts - something that can be very, very bad.

          >>>>