A simple problem that is taxing a simple mind. I have an unbound textbox and a command button on a form. The user types in the password into the textbox and clicks the button. In the on-click event procedure for the button I have put this code simply as a test. The problem is if the box is left empty and the button clicked, the word ‘Welcome’ appears when I wish it to read ‘Invalid’.
Private Sub Command2_Click()
Dim MyPass As String
MyPass = “Anything”
If Text0.Value MyPass Or Text0.Value = “” Then GoTo Line2 Else GoTo Line1
Line1:
Text0.Value = “Welcome”
End
Line2:
Text0.Value = “Invalid”
End Sub
Help please!
Rob