vb和SQL做的学生成绩管理系统

上传人:我*** 文档编号:132683735 上传时间:2020-05-19 格式:DOC 页数:21 大小:1.41MB
返回 下载 相关 举报
vb和SQL做的学生成绩管理系统_第1页
第1页 / 共21页
vb和SQL做的学生成绩管理系统_第2页
第2页 / 共21页
vb和SQL做的学生成绩管理系统_第3页
第3页 / 共21页
vb和SQL做的学生成绩管理系统_第4页
第4页 / 共21页
vb和SQL做的学生成绩管理系统_第5页
第5页 / 共21页
点击查看更多>>
资源描述

《vb和SQL做的学生成绩管理系统》由会员分享,可在线阅读,更多相关《vb和SQL做的学生成绩管理系统(21页珍藏版)》请在金锄头文库上搜索。

1、Form1的代码:Private Sub Command1_Click()Unload MeForm3.ShowEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd SubPrivate Sub Command3_Click()If MsgBox(确定退出管理系统?, _ vbQuestion + vbYesNo + vbDefaultButton2, 警告!) = vbYes ThenEndEnd IfEnd SubPrivate Sub Picture1_Click()End SubPrivate Sub Timer1_Time

2、r()Command4.Caption = Time$() End SubPrivate Sub Form_Load()Timer1.Interval = 1000Timer1.Enabled = TrueEnd SubForm2的代码:Private Sub Command1_Click()Adodc1.Recordset.MoveFirst Adodc1.Recordset.Find 用户名= & Text1.Text & If Adodc1.Recordset.EOF = True Then Adodc1.Recordset.MoveFirst If (Trim(Text1.Text)

3、= (Trim(Text3.Text) And (Trim(Text2.Text) = (Trim(Text4.Text) Then Adodc1.Enabled = False Form4.Text3.Text = Text1.Text Unload Me Form8.Show Else MsgBox 非法的账号!, vbOKOnly + vbExclamation, 请重新输入! Text1.Text = Text2.Text = Text1.SetFocus End IfEnd SubPrivate Sub Command2_Click()Text1.Text = Text2.Text

4、= End SubPrivate Sub Command3_Click()Unload MeForm1.ShowEnd SubPrivate Sub Form_Load()Text2.Text = Text1.Text = Text2.PasswordChar = *End SubPrivate Sub Picture1_Click()End SubForm3的代码:Private Sub Command1_Click()Adodc1.Recordset.MoveFirst Adodc1.Recordset.Find 用户名= & Text1.Text & If Adodc1.Recordse

5、t.EOF = True Then Adodc1.Recordset.MoveFirst If (Trim(Text1.Text) = (Trim(Text3.Text) And (Trim(Text2.Text) = (Trim(Text4.Text) Then Adodc1.Enabled = False Form4.Text1.Text = Text1.Text Form4.Text2.Text = Text4.Text Unload Me Form5.Show Else MsgBox 非法的账号!, vbOKOnly + vbExclamation, 请重新输入! Text1.Text

6、 = Text2.Text = Text1.SetFocus End IfEnd SubPrivate Sub Command2_Click() Option1.Value = False Option2.Value = False Text1.Text = Text2.Text = End SubPrivate Sub Command3_Click()Unload MeForm1.ShowEnd SubPrivate Sub Form_Load()Text2.Text = Text1.Text = Text2.PasswordChar = *End Sub无代码Form5的代码:Privat

7、e Sub cjcx_Click(Index As Integer)Unload MeForm7.ShowEnd SubPrivate Sub Command1_Click()On Error Resume Next If Command1.Caption = 修改 Then Command1.Caption = 确认 Adodc2.Recordset.Requery Text5.SetFocus Else Command1.Caption = 修改 Adodc2.Recordset.Update MsgBox 修改成功 End IfEnd SubPrivate Sub Form_Load()

8、Adodc1.CommandType = adCmdUnknownAdodc1.RecordSource = Select * From studentwel Where 用户名 = & Form4.Text1.Text & Adodc1.Refresh Text1.Visible = TrueText3.Visible = TrueTimer1.Interval = 1000Timer1.Enabled = TrueEnd SubPrivate Sub Picture1_Click()End SubPrivate Sub tcxt_Click(Index As Integer)Unload

9、MeForm3.ShowEnd SubPrivate Sub Timer1_Timer()Text2.Text = Time$() End SubPrivate Sub xgmm_Click()Label5.Visible = TrueLabel7.Visible = TrueText4.Visible = TrueText5.Visible = TrueCommand1.Visible = TrueAdodc2.CommandType = adCmdUnknownAdodc2.RecordSource = Select * From studententer Where 用户名 = & Fo

10、rm4.Text1.Text & Adodc2.RefreshEnd SubPrivate Sub xxcx_Click(Index As Integer)Unload MeForm6.ShowEnd SubForm6的代码:Private Sub Command1_Click()Unload MeForm5.ShowEnd SubPrivate Sub Command2_Click()On Error Resume Next If Command2.Caption = 修改 Then Text1.SetFocus Command2.Caption = 确认 Adodc1.Recordset.

11、Requery MsgBox 信息修改成功 Else Command2.Caption = 修改 Adodc1.Recordset.Update End If End SubPrivate Sub Form_Load()Adodc1.CommandType = adCmdUnknownAdodc1.RecordSource = Select * From studentinfor Where 学号 = & Form4.Text1.Text & Adodc1.Refresh Text1.Visible = TrueText2.Visible = TrueText3.Visible = TrueT

12、ext4.Visible = TrueText5.Visible = TrueText6.Visible = TrueText7.Visible = TrueText8.Visible = TrueEnd SubPrivate Sub Picture1_Click()End SubPrivate Sub Command1_Click()Unload MeForm5.ShowEnd SubPrivate Sub Form_Load()Adodc1.Recordset.MoveFirst Dim a As String a = Form4.Text1.Text Adodc1.Recordset.F

13、ind 学号= & a & Text1.Visible = TrueText2.Visible = TrueText4.Visible = TrueText6.Visible = TrueDim b As Integerb = Text2.TextIf b = 90 ThenText3.Text = 优ElseIf b = 80 ThenText3.Text = 良ElseIf b = 70 ThenText3.Text = 中ElseIf b = 60 ThenText3.Text = 及格ElseText3.Text = 不及格End IfDim c As Integerc = Text4.TextIf c = 90 ThenText5.Text = 优ElseIf c = 80 ThenText5.Text = 良ElseIf c = 70 ThenText5.Text = 中ElseIf c = 60 ThenText5.Text = 及格ElseText5.Text = 不及格End IfDim d As Integerd = Text6.TextIf d = 90 ThenText7.Text = 优ElseIf d = 80 ThenText7.Text = 良ElseIf d = 70 Th

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 事务文书

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号