The code is as follows:
Private Sub Text2_KeyPress (KeyAscii As Integer)
If KeyAscii=13 Then
If Text1="XXX" And Text2=1234 Then
Form1. Show
Form2. Hide
The Else
Text2=""
Text2. SetFocus
End the If
End the If
End Sub
CodePudding user response:
You may not be on TEXTBOX2 press enterCodePudding user response:
1234 get quotes:
If KeyAscii=13 Then
If Text1="XXX" And Text2="1234" Then
Form1. Show
Form2. Hide
The Else
Text2=""
Text2. SetFocus
End the If
End the If
CodePudding user response:
You enter the user name password form is Form1, why also Form1. Show?Seems should be Form2. Show?
CodePudding user response:
Form1. HideForm2. Show
Did you got
CodePudding user response:
Add a button control, write the login verification in the button controlCodePudding user response: