on-internet
← Community

Making a form read-only for a certain user type

Stack Overflow ·

I have created a login form with a combo box for the user type (Admin, User) and a text box for the password. The code for the form is as follows. Private Sub txtPassword_AfterUpdate() If IsNull(Me.cboUser) Then MsgBox "You need to select a user!", vbCritical Me.cboUser.SetFocus Else If Me.txtPassword = Me.cboUser.Column(2) Then If Me.cboUser.Column(3) = True Then MsgBox "Password does not match, please re-enter!", vboOkOnly Me.txtPassword = Null Me.txtPassword.SetFocus End If DoCmd.OpenForm "FE1" Me.Visible = False Else MsgBox "Password does not match, please re-enter!", vboOkOnly Me.txtPassw

Comments

Sign in or sign up to comment and upvote.

No comments yet.