⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form5.frm

📁 学生作业管理系统 1、能够随时查询学生的各种成绩 2、能够计算出学生的综合成绩 3、设计报表打印出学生的综合成绩 4、能够输入各种实际数据 5、其他约定: a.缺勤超过两次考勤成绩为0
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form5 
   Caption         =   "Form5"
   ClientHeight    =   6345
   ClientLeft      =   5490
   ClientTop       =   1875
   ClientWidth     =   4695
   LinkTopic       =   "Form5"
   ScaleHeight     =   6345
   ScaleWidth      =   4695
   Begin VB.Frame 学生信息表 
      BackColor       =   &H00C0FFC0&
      Caption         =   "学生信息表"
      Height          =   6135
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   4575
      Begin VB.CommandButton Command3 
         Caption         =   "返回"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   2880
         TabIndex        =   6
         Top             =   5520
         Width           =   975
      End
      Begin VB.CommandButton command2 
         Caption         =   "删除"
         Height          =   495
         Left            =   1440
         TabIndex        =   5
         Top             =   5520
         Width           =   975
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   3000
         TabIndex        =   3
         Text            =   "Text1"
         Top             =   4680
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         Caption         =   "修改"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   120
         TabIndex        =   2
         Top             =   5520
         Width           =   975
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Height          =   4215
         Left            =   120
         TabIndex        =   1
         Top             =   240
         Width           =   4095
         _ExtentX        =   7223
         _ExtentY        =   7435
         _Version        =   393216
         Rows            =   1000
         Cols            =   4
         FixedRows       =   0
         FixedCols       =   0
      End
      Begin VB.Label Label1 
         Caption         =   "请输入所要修改成绩的学生的学号:"
         Height          =   375
         Left            =   120
         TabIndex        =   4
         Top             =   4680
         Width           =   2895
      End
   End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Function StuList_update()
   Dim rs As New ADODB.Recordset
   Dim sql As String
   sql = "select * from 成绩表"
    
   Dim i As Integer
   Set rs = TransactSQL(sql)
      With MSFlexGrid1
        .Rows = 1
        While Not rs.EOF
        .Rows = .Rows + 1
        .TextMatrix(.Rows - 1, 0) = rs(0)
        .TextMatrix(.Rows - 1, 1) = rs(1)
        .TextMatrix(.Rows - 1, 2) = rs(2)
        .TextMatrix(.Rows - 1, 3) = rs(3)
         rs.MoveNext
        Wend
      End With
End Function

Private Sub Command3_Click()
Form1.Show
Unload Form5
End Sub

Private Sub Form_Load()

    With MSFlexGrid1
         .TextMatrix(0, 0) = "学号"
         .TextMatrix(0, 1) = "课程编号"
         .TextMatrix(0, 2) = "考试时间"
         .TextMatrix(0, 3) = "成绩"
         .ColWidth(2) = 1200
         '.ColWidth(4) = 1800
         '.ColWidth(7) = 1500
         '.ColWidth(9) = 1200
         '.ColWidth(13) = 1200
         '.ColWidth(14) = 2000
         .BackColorFixed = RGB(247, 214, 157)
    End With
    '显示表中数据
    Call StuList_update
    Text1.Text = ""
End Sub
Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
    Dim sql As String
    sql = "select * from 成绩表 where stu_Id ='" & Text1.Text & "'"
    If Trim(Text1.Text) = "" Then
       MsgBox "请输入所要修改成绩的的学生的的学号!", vbOKOnly, "提示!"
       Else
       Set rs = TransactSQL(sql)
       If rs.EOF = True Then
          MsgBox "没有该学号学生的成绩!", vbOKOnly, "提示!"
       Else
          modifyGrFlag1 = Text1.Text
          modifyGrFlag2 = True
          Form4.Show
          Form4.Command1.Enabled = False
          Form4.Command3.Enabled = True
          Form4.Command3.Visible = False
          Form4.Command4.Visible = True
          Unload Form5
          rs.Close
       End If
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -