Coco_Nutty
Jan 28th, 2000, 01:49 AM
Dim Dan
Sub Form_Load()
Dan = 0
End Sub
Sub Command1_Click()
End
End Sub
Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{tab}"
KeyAscii = 0
Dan = Dan + 1
End If
End Sub
Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Sub Text1_Gotfocus()
If Dan = 0 Then
Text1.Text = ""
Text2.Visible = False
Label2.Visible = False
Label1.Caption = "Place entry here"
Else
Text1.Visible = True
Label1.Visible = True
Text2.Visible = False
Label2.Visible = False
Text2.Text = ""
Label1.Caption = "Now place entry here"
End If
End Sub
Sub Text1_Lostfocus()
Text1.Visible = False
Label1.Visible = False
Text2.Visible = True
Label2.Visible = True
Text2.Text = ""
Text2.SetFocus
Label2.Caption = "Now place entry here"
End Sub
Sub Text2_LostFocus()
Text1.Visible = True
Label1.Visible = True
Text2.Visible = False
Label2.Visible = False
Text1.Text = ""
Text1.SetFocus
Label1.Caption = "Now place entry here"
End Sub
The problem I have above is that my Click()
does not shut down my program. It switches Text boxes instead. Is there an alternate way to shut down the form with Command1_Click()
Thanks
Coco
Sub Form_Load()
Dan = 0
End Sub
Sub Command1_Click()
End
End Sub
Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{tab}"
KeyAscii = 0
Dan = Dan + 1
End If
End Sub
Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Sub Text1_Gotfocus()
If Dan = 0 Then
Text1.Text = ""
Text2.Visible = False
Label2.Visible = False
Label1.Caption = "Place entry here"
Else
Text1.Visible = True
Label1.Visible = True
Text2.Visible = False
Label2.Visible = False
Text2.Text = ""
Label1.Caption = "Now place entry here"
End If
End Sub
Sub Text1_Lostfocus()
Text1.Visible = False
Label1.Visible = False
Text2.Visible = True
Label2.Visible = True
Text2.Text = ""
Text2.SetFocus
Label2.Caption = "Now place entry here"
End Sub
Sub Text2_LostFocus()
Text1.Visible = True
Label1.Visible = True
Text2.Visible = False
Label2.Visible = False
Text1.Text = ""
Text1.SetFocus
Label1.Caption = "Now place entry here"
End Sub
The problem I have above is that my Click()
does not shut down my program. It switches Text boxes instead. Is there an alternate way to shut down the form with Command1_Click()
Thanks
Coco