📄 form0702.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "输入学生成绩"
ClientHeight = 3825
ClientLeft = 60
ClientTop = 450
ClientWidth = 6495
LinkTopic = "Form1"
ScaleHeight = 3825
ScaleWidth = 6495
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text5
DataField = "英语"
DataSource = "Data1"
Height = 615
Left = 1560
TabIndex = 17
Top = 2760
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "第一个"
Height = 495
Left = 3600
TabIndex = 15
Top = 480
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "最后一个"
Height = 495
Left = 3600
TabIndex = 14
Top = 3000
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "下一个"
Height = 495
Left = 3600
TabIndex = 13
Top = 2160
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "前一个"
Height = 495
Left = 3600
TabIndex = 12
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command8
Caption = "结束"
Height = 495
Left = 4920
TabIndex = 11
Top = 3000
Width = 1095
End
Begin VB.CommandButton Command7
Caption = "修改"
Height = 495
Left = 4920
TabIndex = 10
Top = 2160
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "删除"
Height = 495
Left = 4920
TabIndex = 9
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command5
Caption = "添加"
Height = 495
Left = 4920
TabIndex = 8
Top = 480
Width = 1095
End
Begin VB.Data Data1
Caption = "学生成绩"
Connect = "Access"
DatabaseName = "C:\Documents and Settings\CAO Yi\My Documents\BookVBQH\20040920\exe\StudentAd.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 1200
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "Score"
Top = 3360
Visible = 0 'False
Width = 2895
End
Begin VB.TextBox Text4
DataField = "数学"
DataSource = "Data1"
Height = 495
Left = 1560
TabIndex = 7
Top = 2160
Width = 1455
End
Begin VB.TextBox Text3
DataField = "语文"
DataSource = "Data1"
Height = 495
Left = 1560
TabIndex = 5
Top = 1560
Width = 1455
End
Begin VB.TextBox Text2
DataField = "姓名"
DataSource = "Data1"
Height = 495
Left = 1560
TabIndex = 3
Top = 960
Width = 1455
End
Begin VB.TextBox Text1
DataField = "学号"
DataSource = "Data1"
Height = 495
Left = 1560
TabIndex = 0
Top = 360
Width = 1455
End
Begin VB.Label Label5
Caption = "学号"
Height = 375
Left = 600
TabIndex = 16
Top = 360
Width = 855
End
Begin VB.Label Label4
Caption = "英语"
Height = 375
Left = 480
TabIndex = 6
Top = 2880
Width = 975
End
Begin VB.Label Label3
Caption = "数学"
Height = 375
Left = 600
TabIndex = 4
Top = 2280
Width = 975
End
Begin VB.Label Label2
Caption = "语文"
Height = 375
Left = 600
TabIndex = 2
Top = 1680
Width = 975
End
Begin VB.Label Label1
Caption = "姓名"
Height = 375
Left = 600
TabIndex = 1
Top = 960
Width = 975
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
'单击第一个按钮
Data1.Recordset.MoveFirst
End Sub
Private Sub Command2_Click()
'单击前一个按钮
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
End Sub
Private Sub Command3_Click()
'单击下一个按钮
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
End Sub
Private Sub Command4_Click()
'单击最后一个按钮
Data1.Recordset.MoveLast
End Sub
Private Sub Command5_Click()
'单击添加按钮
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub
Private Sub Command6_Click()
'单击删除按钮
Dim mag
mag = MsgBox("要删除吗?", vbYesNo, "删除记录 ")
If mag = vbYes Then
Data1.Recordset.Delete
Data1.Recordset.MoveLast
End If
End Sub
Private Sub Command7_Click()
'单击修改按钮
Data1.Recordset.Edit
Data1.Recordset.Update
End Sub
Private Sub Command8_Click()
'单击结束按钮
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -