📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5670
ClientLeft = 60
ClientTop = 345
ClientWidth = 6240
LinkTopic = "Form1"
ScaleHeight = 5670
ScaleWidth = 6240
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command8
Caption = "&Exit"
Height = 615
Left = 5040
TabIndex = 21
Top = 240
Width = 975
End
Begin VB.CommandButton Command5
Caption = "MoveLast"
Height = 375
Left = 2760
TabIndex = 20
Top = 2280
Width = 1095
End
Begin VB.CommandButton Command7
Caption = "MoveNext"
Height = 375
Left = 4560
TabIndex = 12
Top = 3000
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "MovePrevious"
Height = 375
Left = 4080
TabIndex = 11
Top = 2280
Width = 1335
End
Begin VB.CommandButton Command4
Caption = "MoveFirst"
Height = 375
Left = 3840
TabIndex = 10
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "delete\删除"
Height = 375
Left = 2400
TabIndex = 9
Top = 1680
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "Updata/更新"
Height = 375
Left = 3600
TabIndex = 8
Top = 1080
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "Addnew/新建"
Height = 375
Left = 2040
TabIndex = 7
Top = 1080
Width = 1215
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\Documents and Settings\401\桌面\sun2.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 1800
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "student"
Top = 0
Width = 2700
End
Begin VB.TextBox Text7
DataField = "电话号码"
DataSource = "Data1"
Height = 270
Left = 2880
TabIndex = 6
Top = 720
Width = 1335
End
Begin VB.TextBox Text6
DataField = "家庭住址"
DataSource = "Data1"
Height = 375
Left = 1200
TabIndex = 5
Top = 3000
Width = 3135
End
Begin VB.TextBox Text5
DataField = "年龄"
DataSource = "Data1"
Height = 375
Left = 840
TabIndex = 4
Top = 2520
Width = 855
End
Begin VB.TextBox Text4
DataField = "班级"
DataSource = "Data1"
Height = 375
Left = 840
TabIndex = 3
Top = 2040
Width = 855
End
Begin VB.TextBox Text3
DataField = "性别"
DataSource = "Data1"
Height = 375
Left = 840
TabIndex = 2
Top = 1560
Width = 855
End
Begin VB.TextBox Text2
DataField = "姓名"
DataSource = "Data1"
Height = 375
Left = 840
TabIndex = 1
Top = 1080
Width = 855
End
Begin VB.TextBox Text1
DataField = "学号"
DataSource = "Data1"
Height = 375
Left = 840
TabIndex = 0
Top = 600
Width = 855
End
Begin VB.Label Label7
Caption = "电话号码"
Height = 255
Left = 1800
TabIndex = 19
Top = 720
Width = 855
End
Begin VB.Label Label6
Caption = "家庭住址"
Height = 255
Left = 120
TabIndex = 18
Top = 3120
Width = 855
End
Begin VB.Label Label5
Caption = "出生日期"
Height = 255
Left = 0
TabIndex = 17
Top = 2640
Width = 735
End
Begin VB.Label Label4
Caption = "班级"
Height = 255
Left = 240
TabIndex = 16
Top = 2160
Width = 375
End
Begin VB.Label Label3
Caption = "性别"
Height = 255
Left = 240
TabIndex = 15
Top = 1680
Width = 495
End
Begin VB.Label Label2
Caption = "姓名"
Height = 255
Left = 240
TabIndex = 14
Top = 1080
Width = 375
End
Begin VB.Label Label1
Caption = "学号"
Height = 255
Left = 240
TabIndex = 13
Top = 600
Width = 375
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Data1.Recordset.Update
End Sub
Private Sub Command3_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
Data1.Recordset.MovePrevious
End If
End Sub
Private Sub Command4_Click()
Data1.Recordset.MoveFirst
End Sub
Private Sub Command5_Click()
Data1.Recordset.MoveLast
End Sub
Private Sub Command6_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.EOF = True Then
Data1.Recordset.MoveFirst
End If
End Sub
Private Sub Command7_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
Data1.Recordset.MoveLast
End If
End Sub
Private Sub Command8_Click()
Unload Form1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -