|
-
Jan 24th, 2000, 05:20 PM
#1
Thread Starter
New Member
Private Sub Form_Load()
txtTwo.Visible = False
lblTwo.Visible = False
txtOne.Text = ""
lblOne.Caption = "Place entry here"
End Sub
Private Sub txtOne_GotFocus()
txtOne.SelLength = Len(txtOne.Text)
End Sub
Private Sub txtOne_KeyPress(keyascii As Integer)
If keyascii = vbKeyReturn Then
txtTwo.Visible = True
lblTwo.Visible = True
txtOne.Visible = False
lblOne.Visible = False
lblTwo.Caption = "Now place entry here"
Else
txtTwo.ForeColor = vbBlue
End If
keyascii = 0
End Sub
The code above is giving me the worst trouble.When I load my form txtTwo and lblTwo are hidden like I want but I am unable to enter anything into form one txtOne when the form originaly loads.
Buy the way could it be because I have made the enter key my keyPress.
Thanks
Coco_Nutty
-
Jan 24th, 2000, 08:16 PM
#2
Lively Member
You always set keyascii to 0. Put the code line
keyascii = 0
inside the "If .. End if" statement.
[This message has been edited by RogerH (edited 01-25-2000).]
[This message has been edited by RogerH (edited 01-25-2000).]
-
Jan 25th, 2000, 05:12 AM
#3
Thread Starter
New Member
Thanks, but it still will not let me enter anything into the first Text1(txtOne)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|