As part of my program i wish to prevent a user deleting any records unless the username supplied at the logon screen is equal to "Admin"
I have been using the code
In the form load event of the client form. When the password form is before the client form the code enables the button, but i have created a menu which the password form loads to. Now when the client form loads the button is left disabled.
Why is this and how do i fix it?
I have been using the code
VB.NET:
'Check if User name = Admin if so enable the delete button
If frmPass.txtPass.Text = "Admin" Then
Me.btnDel.Enabled = True
Else
frmClient.btnDel.Enabled = False
End If
In the form load event of the client form. When the password form is before the client form the code enables the button, but i have created a menu which the password form loads to. Now when the client form loads the button is left disabled.
Why is this and how do i fix it?