📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "Form2"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 11010
ScaleWidth = 15240
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
Begin VB.TextBox Text1
Height = 735
Left = 2880
TabIndex = 7
Text = " "
Top = 1800
Width = 2055
End
Begin VB.TextBox Text2
Height = 615
Left = 2880
TabIndex = 6
Text = " "
Top = 3120
Width = 2055
End
Begin VB.TextBox Text3
Height = 615
Left = 2880
TabIndex = 5
Text = " "
Top = 4560
Width = 2055
End
Begin VB.TextBox Text4
Height = 615
Left = 2880
TabIndex = 4
Text = " "
Top = 6120
Width = 2055
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "E:\Documents and Settings\mhp\Desktop\platform1\TRAIN.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 495
Left = 3480
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "TRAIN"
Top = 8400
Width = 3855
End
Begin VB.CommandButton cmdadd
Caption = "ADD"
Height = 735
Left = 6720
TabIndex = 3
Top = 1680
Width = 2055
End
Begin VB.CommandButton Command2
Caption = "UPDATE"
Height = 735
Left = 6720
TabIndex = 2
Top = 3120
Width = 2055
End
Begin VB.CommandButton Command3
Caption = "CANCEL"
Height = 735
Left = 6720
TabIndex = 1
Top = 4560
Width = 2055
End
Begin VB.CommandButton cmdback
Caption = "<<<---------------------"
Height = 735
Left = 6720
TabIndex = 0
Top = 6000
Width = 2055
End
Begin VB.Label Label1
Caption = "TRAIN DETAILS"
BeginProperty Font
Name = "MS Serif"
Size = 13.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3240
TabIndex = 12
Top = 0
Width = 2535
End
Begin VB.Label Label2
Caption = "TRAIN NO"
Height = 615
Left = 0
TabIndex = 11
Top = 1800
Width = 2775
End
Begin VB.Label Label3
Caption = "TRAIN NAME"
Height = 615
Left = 0
TabIndex = 10
Top = 3240
Width = 2535
End
Begin VB.Label Label4
Caption = "ARRIVAL TIME"
Height = 615
Left = 0
TabIndex = 9
Top = 4680
Width = 2175
End
Begin VB.Label Label5
Caption = "DEPARTURE TIME"
Height = 615
Left = 0
TabIndex = 8
Top = 6240
Width = 2055
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdadd_Click()
With Data1.Recordset
.Edit
.AddNew
.Fields(0) = Text1.Text
.Fields(1) = Text2.Text
.Fields(2) = Text3.Text
.Fields(3) = Text4.Text
MsgBox "plz update"
End With
End Sub
Private Sub cmdback_Click()
Me.Hide
Form1.Show
End Sub
Private Sub Command2_Click()
Data1.Recordset.Update
MsgBox " RECORD HAS BEEN UPDATED !!!!", vbInformation
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -