Public Class passopen Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim password As String = "lhoyaccess123" If TextBox1.Text = password And Dashboard.openapp.Text = "Printout" Then Me.Close() TextBox1.Text = "" Dashboard.openapp.Text = "" Printout.Show() ElseIf TextBox1.Text = password And Dashboard.openapp.Text = "unmarkdecease" Then Me.Close() TextBox1.Text = "" Dashboard.openapp.Text = "" masterlist.unmarkdecease() Else MsgBox("Wrong Password", MsgBoxStyle.Information, "Open") Return End If End Sub Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.Enter Then Button1.PerformClick() Else End If End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click End Sub End Class