berch.blogg.se

Ms access database template
Ms access database template













ms access database template
  1. #Ms access database template code
  2. #Ms access database template password

If is a user then close Login Form and open a Navigation Form, but disable the Admin button on the navigation bar (NavigationButton13.Enabled = False).If is a Admin, then close Login Form and open a Navigation Form.

ms access database template

#Ms access database template password

  • If a password is not “password” then verify if the login user is Admin or User.
  • If matching, then check if the login user has a temp password = “password”, if yes then close Login Form and open form “frmworkerinfo” to change their password.
  • If both Login ID and Password are entered, then verify with table tblWorker if they match.
  • If not, show a message to enter a Login ID or Password.
  • Verify if the Login ID and Password both are entered.
  • #Ms access database template code

    Under On Click Event of the OK button, add the VBA code below under the Event Procedure How the code above works Under On Click Event of the Cancel button, add the Embadded Macro with a QuitAccess command to exit the program or Access applicationĦ. Input two text boxes in the Login Form as txtUserName with label Login ID and txtPassword with label Passwordĥ. Then customize the form such as resize, change caption or name form.Ĥ. Create a Login Form from the Dialog form design. You can create the UserType field from the Lookup Wizard on the dropdown of Data Type column.ģ. So the data type of a UserType field is number because it refers to the SecurityID (Autonumber) in the tblSecurityLevel table above. On my database, I setup a table tblWorker that has a UserType field links to a table tlbSecurityLevel. Create a table tblWorker with a LoginID, Password and UserType fields. Create a table tblSecurityLevel with a SecurityID and SecurityLevel field and add Admin for SecurityID =1 and User for SecurityID =2Ģ. The step of creating Login Form can be followed below:ġ. Before creating a Login Form, you need to set up a table that can verify the login ID and password on the Login Form.















    Ms access database template