📄 成绩修改.frm
字号:
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6600
TabIndex = 13
Text = "Text7"
Top = 1440
Width = 3615
End
Begin VB.TextBox Text6
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 11
Text = "Text6"
Top = 1440
Width = 3615
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 960
TabIndex = 7
Text = "Text4"
Top = 960
Width = 2175
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 8040
TabIndex = 5
Text = "Text3"
Top = 480
Width = 2175
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4560
TabIndex = 3
Text = "Text2"
Top = 480
Width = 2175
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 960
TabIndex = 1
Text = "Text1"
Top = 480
Width = 2175
End
Begin VB.Label Label10
Caption = "科目分数:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5520
TabIndex = 17
Top = 1920
Width = 1095
End
Begin VB.Label Label9
Caption = "课程性质:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 14
Top = 1920
Width = 1095
End
Begin VB.Label Label8
Caption = "考试地点:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5520
TabIndex = 12
Top = 1440
Width = 1095
End
Begin VB.Label Label7
Caption = "考试科目:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 10
Top = 1440
Width = 1095
End
Begin VB.Label Label6
Caption = "考试时间:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7080
TabIndex = 9
Top = 960
Width = 1095
End
Begin VB.Label Label5
Caption = "学期:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3720
TabIndex = 8
Top = 960
Width = 735
End
Begin VB.Label Label4
Caption = "专业:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 6
Top = 960
Width = 735
End
Begin VB.Label Label3
Caption = "年级:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7320
TabIndex = 4
Top = 480
Width = 735
End
Begin VB.Label Label2
Caption = "姓名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3720
TabIndex = 2
Top = 480
Width = 735
End
Begin VB.Label Label1
Caption = "学号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 0
Top = 480
Width = 735
End
End
Attribute VB_Name = "Frm_UpdateChengJ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If admin = 1 Then
Dim myCon As New ADODB.Connection
Dim myRs As New ADODB.Recordset
Dim XueHao, XingMing, NianJi, ZhuanYe, XueQi, KaoSSJ, KaoSKM, KaoSDD, KeCXZ, KeMFS As String
XueHao = Text1.Text
XingMing = Text2.Text
NianJi = Text3.Text
ZhuanYe = Text4.Text
XueQi = DTPicker2.Value
KaoSSJ = DTPicker1.Value
KaoSKM = Text6.Text
KaoSDD = Text7.Text
KeCXZ = Combo2.Text
KeMFS = Text8.Text
If Trim(XueHao) = "" Or Trim(XingMing) = "" Or Trim(NianJi) = "" Or Trim(ZhuanYe) = "" Or Trim(XueQi) = "" Or Trim(KaoSSJ) = "" Or Trim(KaoSKM) = "" Or Trim(KaoSDD) = "" Or Trim(KeCXZ) = "" Or Trim(KeMFS) = "" Then
MsgBox "请填写完整要修改成绩资料的内容!"
Exit Sub
End If
myCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=信息.mdb;"
myRs.Open "select * from 成绩表 where 学号='" & Text1.Text & "'", myCon, 3, 2
myRs!姓名 = Text2.Text
myRs!年级 = Text3.Text
myRs!专业 = Text4.Text
myRs!学期 = DTPicker2.Value
myRs!考试时间 = DTPicker1.Value
myRs!考试科目 = Text6.Text
myRs!考试地点 = Text7.Text
myRs!课程性质 = Combo2.Text
myRs!科目分数 = Text8.Text
myRs.Update
myRs.Close
myCon.Close
MsgBox "您确定要修改吗?", vbYesNo, "提示"
Frm_UpdateChengJ.Adodc1.RecordSource = "select 学号,姓名,年级,专业,学期,考试时间,考试科目,考试地点,课程性质,科目分数 from 成绩表 order by 学号"
Frm_UpdateChengJ.Adodc1.Refresh
Frm_UpdateChengJ.Adodc1.Refresh
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
'Text5.Text = ""
'Combo1.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo2.Text = ""
Text8.Text = ""
Else
MsgBox "对不起,您没有这个权限!", vbOKOnly + vbExclamation, "提示"
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Unload Me
Frm_FindChengJ.Show 1
End Sub
Private Sub DataGrid1_Click()
'Frm_UpdateChengJ.Adodc1.RecordSource = "select * from 成绩表 where 学号 = '" & Trim(DataGrid1.Row) & "'"
'Text1.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("学号")
'Text2.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("姓名")
'Text3.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("年级")
'Text4.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("专业")
'Text5.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("学期")
'Combo1.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("考试时间")
'Text6.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("考试科目")
'Text7.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("考试地点")
'Combo2.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("课程性质")
'Text8.Text = Frm_UpdateChengJ.Adodc1.Recordset.Fields("科目分数")
End Sub
Private Sub Form_Activate()
Frm_FindChengJ.Adodc1.RecordSource = strTiaoJian
Frm_FindChengJ.Adodc1.Refresh
Set DataGrid1.DataSource = Frm_FindChengJ.Adodc1
End Sub
Private Sub Form_Load()
Combo2.AddItem ("必修")
Combo2.AddItem ("选修")
Combo2.AddItem ("自开")
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
'Text5.Text = ""
'Combo1.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo2.Text = ""
Text8.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -