📄 edit.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmEdit
Caption = "学生信息修改"
ClientHeight = 4050
ClientLeft = 1770
ClientTop = 420
ClientWidth = 5175
LinkTopic = "Form1"
ScaleHeight = 4050
ScaleWidth = 5175
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "注意:"
ForeColor = &H000000FF&
Height = 855
Left = 120
TabIndex = 16
Top = 120
Width = 3015
Begin VB.Label Label7
Caption = "带星号的为添加操作时必填项目"
ForeColor = &H000000FF&
Height = 255
Left = 240
TabIndex = 17
Top = 360
Width = 2535
End
End
Begin VB.CommandButton cmdDelete
Caption = "删除"
Height = 375
Left = 3360
TabIndex = 15
Top = 1800
Width = 1575
End
Begin VB.CommandButton cmdAdd
Caption = "添加"
Height = 375
Left = 3360
TabIndex = 14
Top = 1200
Width = 1575
End
Begin VB.TextBox Text6
DataField = "班级"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 13
Top = 3000
Width = 1335
End
Begin VB.TextBox Text5
DataField = "年龄"
DataSource = "Adodc1"
Height = 375
Left = 2400
TabIndex = 11
Top = 2400
Width = 735
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 240
Top = 3600
Width = 4695
_ExtentX = 8281
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
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 = "SELECT * FROM 学生信息"
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 cmdClose
Caption = "退出"
Height = 375
Left = 3360
TabIndex = 9
Top = 2400
Width = 1575
End
Begin VB.CommandButton cmdUpdata
Caption = "更新"
Height = 735
Left = 3360
TabIndex = 8
Top = 240
Width = 1575
End
Begin VB.TextBox Text4
DataField = "电话号码"
DataSource = "Adodc1"
Height = 375
Left = 3360
TabIndex = 7
Top = 3000
Width = 1575
End
Begin VB.TextBox Text3
DataField = "性别"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 5
Top = 2400
Width = 735
End
Begin VB.TextBox Txt2
DataField = "姓名"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 3
Top = 1800
Width = 2295
End
Begin VB.TextBox Txt1
DataField = "学号"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 1
Top = 1200
Width = 2295
End
Begin VB.Label Label6
Caption = " * 班级:"
Height = 375
Left = 0
TabIndex = 12
Top = 3120
Width = 735
End
Begin VB.Label Label5
Caption = " * 年龄:"
Height = 255
Left = 1560
TabIndex = 10
Top = 2520
Width = 855
End
Begin VB.Label Label4
Caption = "电话号码:"
Height = 255
Left = 2400
TabIndex = 6
Top = 3120
Width = 855
End
Begin VB.Label Label3
Caption = " * 性别:"
Height = 255
Left = 0
TabIndex = 4
Top = 2520
Width = 735
End
Begin VB.Label Label2
Caption = " * 姓名:"
Height = 255
Left = 0
TabIndex = 2
Top = 1920
Width = 735
End
Begin VB.Label Label1
Caption = " * 学号:"
Height = 255
Left = 0
TabIndex = 0
Top = 1320
Width = 855
End
End
Attribute VB_Name = "frmEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdDelete_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 cmdUpdata_Click()
On Error GoTo UpdateErr
Adodc1.Recordset.UpdateBatch adAffectAll
MsgBox "更新成功!" & vbCr
Exit Sub
UpdateErr:
MsgBox "更新失败,请检查是否输入有误!" & vbCr
End Sub
Private Sub Command2_Click()
Unload Me
SysMain.Show
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
On Error GoTo AddErr
Adodc1.Recordset.AddNew
MsgBox "请输入信息,注意数据格式!" & vbCr
Exit Sub
AddErr:
MsgBox "添加失败,请检查是否输入有误或者有遗漏?" & vbCr
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -