home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "SetFocus Method"
- ClientHeight = 2655
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4275
- LinkTopic = "Form1"
- ScaleHeight = 2655
- ScaleWidth = 4275
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton SaveBttn
- Caption = "Save Record"
- Height = 360
- Left = 2445
- TabIndex = 10
- Top = 2130
- Width = 1590
- End
- Begin VB.TextBox Text5
- Height = 285
- Left = 3000
- TabIndex = 9
- Top = 1560
- Width = 975
- End
- Begin VB.TextBox Text4
- Height = 285
- Left = 960
- TabIndex = 7
- Top = 1560
- Width = 615
- End
- Begin VB.TextBox Text3
- Height = 285
- Left = 960
- TabIndex = 5
- Top = 1080
- Width = 1935
- End
- Begin VB.TextBox Text2
- Height = 285
- Left = 960
- TabIndex = 1
- Top = 585
- Width = 3015
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 960
- TabIndex = 0
- Top = 120
- Width = 1935
- End
- Begin VB.Label Label5
- Caption = "ZIP Code"
- Height = 255
- Left = 1920
- TabIndex = 8
- Top = 1575
- Width = 855
- End
- Begin VB.Label Label4
- Caption = "State"
- Height = 255
- Left = 120
- TabIndex = 6
- Top = 1575
- Width = 735
- End
- Begin VB.Label Label3
- Caption = "City"
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 1095
- Width = 615
- End
- Begin VB.Label Label2
- Caption = "Address"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 600
- Width = 975
- End
- Begin VB.Label Label1
- Caption = "Name"
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 135
- Width = 1095
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Load()
- End Sub
- Private Sub SaveBttn_Click()
- MsgBox "Record Saved. Click OK to enter another"
- Text1.Text = ""
- Text2.Text = ""
- Text3.Text = ""
- Text4.Text = ""
- Text5.Text = ""
- Text1.SetFocus
- End Sub
- Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
- If KeyCode = 13 Then Text2.SetFocus
- End Sub
- Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
- If KeyCode = 13 Then Text3.SetFocus
- End Sub
- Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)
- If KeyCode = 13 Then Text4.SetFocus
- End Sub
- Private Sub Text4_KeyUp(KeyCode As Integer, Shift As Integer)
- If KeyCode = 13 Then Text5.SetFocus
- End Sub
- Private Sub Text5_KeyUp(KeyCode As Integer, Shift As Integer)
- If KeyCode = 13 Then SaveBttn.SetFocus
- End Sub
-