📄 cjedit.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form CjEdit
Caption = "学生成绩编辑"
ClientHeight = 3930
ClientLeft = 570
ClientTop = 420
ClientWidth = 4650
LinkTopic = "Form1"
ScaleHeight = 3930
ScaleWidth = 4650
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "注意:"
ForeColor = &H000000FF&
Height = 615
Left = 360
TabIndex = 14
Top = 120
Width = 2535
Begin VB.Label Label6
Caption = "带星号的为添加时必添项"
ForeColor = &H000000FF&
Height = 255
Left = 240
TabIndex = 15
Top = 240
Width = 2055
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 240
Top = 3480
Width = 4215
_ExtentX = 7435
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\学生信息管理系统\数据库\网络0431班学生名单.MDB;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\学生信息管理系统\数据库\网络0431班学生名单.MDB;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "学生成绩"
Caption = " 学生成绩编辑"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command4
Caption = "退出"
Height = 495
Left = 3120
TabIndex = 12
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "删除"
Height = 495
Left = 3120
TabIndex = 11
Top = 1800
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "添加"
Height = 495
Left = 3120
TabIndex = 10
Top = 1080
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "更新"
Height = 495
Left = 3120
TabIndex = 9
Top = 240
Width = 1215
End
Begin VB.TextBox Text5
DataField = "计算机"
DataSource = "Adodc1"
Height = 285
Left = 1320
TabIndex = 8
Top = 2760
Width = 1575
End
Begin VB.TextBox Text4
DataField = "英语"
DataSource = "Adodc1"
Height = 285
Left = 1320
TabIndex = 6
Top = 2280
Width = 1575
End
Begin VB.TextBox Text3
DataField = "高数"
DataSource = "Adodc1"
Height = 285
Left = 1320
TabIndex = 4
Top = 1800
Width = 1575
End
Begin VB.TextBox Text2
DataField = "姓名"
DataSource = "Adodc1"
Height = 285
Left = 1320
TabIndex = 2
Top = 1320
Width = 1575
End
Begin VB.TextBox Text1
DataField = "学号"
DataSource = "Adodc1"
Height = 285
Left = 1320
TabIndex = 0
Top = 840
Width = 1575
End
Begin VB.Label Label1
Caption = "* 学 号:"
Height = 255
Left = 240
TabIndex = 13
Top = 840
Width = 1095
End
Begin VB.Label Label5
Caption = " 计 算 机:"
Height = 255
Left = 240
TabIndex = 7
Top = 2760
Width = 1335
End
Begin VB.Label Label4
Caption = " 英 语:"
Height = 255
Left = 240
TabIndex = 5
Top = 2280
Width = 1215
End
Begin VB.Label Label3
Caption = " 高 数:"
Height = 255
Left = 240
TabIndex = 3
Top = 1800
Width = 1095
End
Begin VB.Label Label2
Caption = "* 姓 名:"
Height = 255
Left = 240
TabIndex = 1
Top = 1320
Width = 1095
End
End
Attribute VB_Name = "CjEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo UpdateErr
Adodc1.Recordset.UpdateBatch adAffectAll
MsgBox "更新成功!" & vbCr
Exit Sub
UpdateErr:
MsgBox "更新失败,请检查是否输入有误!" & vbCr
End Sub
Private Sub Command2_Click()
On Error GoTo AddErr
Adodc1.Recordset.AddNew
MsgBox "请输入信息,注意数据格式!" & vbCr
Exit Sub
AddErr:
MsgBox "添加失败,请检查是否输入有误!" & vbCr
End Sub
Private Sub Command3_Click()
On Error GoTo DeleteErr
With Adodc1.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox "删除失败,请检查是否输入有误!或者此学生成绩已存在!" & vbCr
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -