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

📄 frmscoi.frm

📁 通过使用本系统可以对学生信息进行管理
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         BackColor       =   &H8000000E&
         Height          =   300
         Index           =   0
         Left            =   0
         MaxLength       =   14
         TabIndex        =   29
         Top             =   600
         Visible         =   0   'False
         Width           =   1380
      End
      Begin VB.PictureBox Command3 
         Height          =   375
         Left            =   5280
         ScaleHeight     =   315
         ScaleWidth      =   1035
         TabIndex        =   15
         Top             =   720
         Width           =   1095
      End
      Begin VB.PictureBox Command4 
         Height          =   375
         Left            =   6840
         ScaleHeight     =   315
         ScaleWidth      =   1035
         TabIndex        =   16
         Top             =   720
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "考试分数"
         Height          =   255
         Index           =   9
         Left            =   6600
         TabIndex        =   36
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "考试课程"
         Height          =   255
         Index           =   8
         Left            =   4920
         TabIndex        =   35
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "学生编号"
         Height          =   255
         Index           =   7
         Left            =   3240
         TabIndex        =   33
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "学生班号"
         Height          =   255
         Index           =   6
         Left            =   1560
         TabIndex        =   32
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "考试期号"
         Height          =   255
         Index           =   1
         Left            =   0
         TabIndex        =   31
         Top             =   0
         Width           =   1335
      End
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      ForeColor       =   &H80000008&
      Height          =   1215
      Index           =   0
      Left            =   240
      ScaleHeight     =   1185
      ScaleWidth      =   8145
      TabIndex        =   2
      Top             =   5880
      Width           =   8175
      Begin VB.TextBox Text1 
         BackColor       =   &H8000000E&
         Height          =   300
         Index           =   0
         Left            =   0
         MaxLength       =   14
         TabIndex        =   18
         Top             =   600
         Visible         =   0   'False
         Width           =   1380
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H8000000E&
         Height          =   300
         Index           =   1
         Left            =   0
         MaxLength       =   10
         TabIndex        =   17
         Top             =   240
         Width           =   1380
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H8000000E&
         Height          =   300
         Index           =   2
         Left            =   6600
         MaxLength       =   10
         TabIndex        =   11
         Top             =   240
         Width           =   1380
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   2
         Left            =   4920
         Style           =   2  'Dropdown List
         TabIndex        =   9
         Top             =   240
         Width           =   1455
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   1
         Left            =   3240
         Style           =   2  'Dropdown List
         TabIndex        =   7
         Top             =   240
         Width           =   1455
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   0
         Left            =   1560
         Style           =   2  'Dropdown List
         TabIndex        =   5
         Top             =   240
         Width           =   1455
      End
      Begin VB.PictureBox Command1 
         Height          =   375
         Left            =   5280
         ScaleHeight     =   315
         ScaleWidth      =   1035
         TabIndex        =   12
         Top             =   720
         Width           =   1095
      End
      Begin VB.PictureBox Command2 
         Height          =   375
         Left            =   6840
         ScaleHeight     =   315
         ScaleWidth      =   1035
         TabIndex        =   13
         Top             =   720
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "考试分数"
         Height          =   255
         Index           =   5
         Left            =   6600
         TabIndex        =   10
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "学生编号"
         Height          =   255
         Index           =   4
         Left            =   3240
         TabIndex        =   8
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "考试课程"
         Height          =   255
         Index           =   3
         Left            =   4920
         TabIndex        =   6
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "学生班号"
         Height          =   255
         Index           =   2
         Left            =   1560
         TabIndex        =   4
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "考试期号"
         Height          =   255
         Index           =   0
         Left            =   0
         TabIndex        =   3
         Top             =   0
         Width           =   1335
      End
   End
   Begin VB.PictureBox MSFlexGrid1 
      Appearance      =   0  'Flat
      Height          =   4770
      Left            =   240
      ScaleHeight     =   4740
      ScaleWidth      =   8145
      TabIndex        =   0
      Top             =   960
      Width           =   8175
   End
   Begin VB.Label Label3 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Caption         =   "           成    绩    信    息    列     表"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   600
      Width           =   8175
   End
End
Attribute VB_Name = "frmscoi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim MsgText As String

Private Sub Combo1_Click(Index As Integer)
    Dim txSQL As String
    If Index = 0 Then
        txSQL = "select * from student_Form where student_Cla='" & Trim(Combo1(0).Text) & "'"
        Set mrc = ExecuteSQL(txSQL, MsgText)
        If mrc.EOF = True Then
            MsgBox "请先进行班级设置!", vbOKOnly, "提示"
        Else
            With Combo1(1)
                .Clear
                Do While Not mrc.EOF
                    .AddItem Trim(mrc!student_NO)
                    mrc.MoveNext
                Loop
            End With
        End If
        txSQL = "select * from class_Cour where class_NO='" & Trim(Combo1(0).Text) & "'"
        Set mrc = ExecuteSQL(txSQL, MsgText)
        If mrc.EOF = True Then
            MsgBox "请先进行班级设置!", vbOKOnly, "提示"
        Else
            With Combo1(2)
                .Clear
                Do While Not mrc.EOF
                    .AddItem Trim(mrc!course_Name)
                    mrc.MoveNext
                Loop
            End With
        End If
    End If
End Sub

Private Sub Combo2_Click(Index As Integer)
    Dim txSQL As String
    If Index = 0 Then
        txSQL = "select DISTINCT score_Stu from score_Form where score_Cla='" & Trim(Combo2(0).Text) & "'"
        Set mrc = ExecuteSQL(txSQL, MsgText)
        If mrc.EOF = False Then
            With Combo2(1)
                .Clear
                Do While Not mrc.EOF
                    .AddItem Trim(mrc!score_Stu)
                    mrc.MoveNext
                Loop
            End With
        End If
        txSQL = "select DISTINCT score_Cou from score_Form where score_Cla='" & Trim(Combo2(0).Text) & "'"
        Set mrc = ExecuteSQL(txSQL, MsgText)
        If mrc.EOF = False Then
            With Combo2(2)
                .Clear
                Do While Not mrc.EOF
                    .AddItem Trim(mrc!score_Cou)
                    mrc.MoveNext
                Loop
            End With
        End If
    End If
End Sub

Private Sub Combo3_Click(Index As Integer)
    Dim txSQL As String
    If Index = 0 Then
        txSQL = "select * from student_Form where student_Cla='" & Trim(Combo3(0).Text) & "'"
        Set mrc = ExecuteSQL(txSQL, MsgText)
        If mrc.EOF = False Then
            With Combo3(1)
                .Clear
                Do While Not mrc.EOF
                    If mrc!student_NO <> .Text Then
                        .AddItem Trim(mrc!student_NO)
                    End If
                    mrc.MoveNext
                Loop
            End With
        End If
        txSQL = "select * from class_Cour where class_NO='" & Trim(Combo3(0).Text) & "'"
        Set mrc = ExecuteSQL(txSQL, MsgText)
        If mrc.EOF = False Then
            With Combo3(2)
                .Clear
                Do While Not mrc.EOF
                    If mrc!course_Name <> .Text Then
                        .AddItem Trim(mrc!course_Name)
                    End If
                    mrc.MoveNext
                Loop
            End With
        End If
    End If
End Sub

Private Sub Command1_Click()
    Dim txtSQL As String
    If Text1(1) = "" Then
        MsgBox "考试期号不能为空!", vbOKOnly, "提示"
        Text1(1).SetFocus
        Exit Sub
    End If
    If Combo1(0).Text = "" Then
        MsgBox "学生班号不能为空!", vbOKOnly, "提示"
        Combo1(0).SetFocus
        Exit Sub
    End If
    If Combo1(1).Text = "" Then
        MsgBox "学生编号不能为空!", vbOKOnly, "提示"
        Combo1(1).SetFocus
        Exit Sub
    End If
    If Combo1(2).Text = "" Then
        MsgBox "考试课程不能为空!", vbOKOnly, "提示"
        Combo1(2).SetFocus
        Exit Sub
    End If
    If Text1(2) = "" Then
        MsgBox "考试分数不能为空!", vbOKOnly, "提示"
        Text1(2).SetFocus
        Exit Sub
    End If
    txtSQL = "select * from score_Form where score_Per='" & Trim(Text1(1)) & "' and score_Cla='" & Trim(Combo1(0).Text) & "' and score_Stu='" & Trim(Combo1(1).Text) & "'And score_Cou='" & Trim(Combo1(2).Text) & "'"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = False Then
        MsgBox "同次同人同科只能添加一次", vbOKOnly, "警告"
        Text1(2) = ""
        Combo1(0).SetFocus
        Exit Sub
    End If
    txtSQL = "select * from score_Form"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    mrc.AddNew
    mrc.Fields(0) = Trim(Text1(0))
    mrc.Fields(1) = Trim(Text1(1))
    mrc.Fields(2) = Trim(Combo1(0).Text)
    mrc.Fields(3) = Trim(Combo1(1).Text)
    mrc.Fields(4) = Trim(Combo1(2).Text)
    mrc.Fields(5) = Trim(Text1(2))
    mrc.Update
    mrc.Close
    MsgBox "考试信息添加成功!", vbOKOnly, "提示"
    With MSFlexGrid1
        .Rows = .Rows + 1
        .TextMatrix(.Rows - 1, 0) = Trim(Text1(0))
        .TextMatrix(.Rows - 1, 1) = Trim(Text1(1))
        .TextMatrix(.Rows - 1, 2) = Trim(Combo1(0).Text)
        .TextMatrix(.Rows - 1, 3) = Trim(Combo1(1).Text)
        .TextMatrix(.Rows - 1, 4) = Trim(Combo1(2).Text)
        .TextMatrix(.Rows - 1, 5) = Trim(Text1(2))
    End With
    Text1(2) = ""
    Combo1(0).Clear
    txtSQL = "select * from class_Form"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = False Then
        With Combo1(0)
            .Clear
            Do While Not mrc.EOF
                .AddItem Trim(mrc!class_NO)
                mrc.MoveNext
            Loop
        End With
    End If
    Combo1(1).Clear
    Combo1(2).Clear
    Text1(0) = GetRkno
    MSFlexGrid1.TopRow = MSFlexGrid1.Rows - 1
End Sub

Private Sub Command2_Click()
    Dim txtSQL As String
    Text1(0) = GetRkno
    Text1(1) = ""
    Text1(2) = ""
    Combo1(0).Clear
    txtSQL = "select * from class_Form"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = False Then
        With Combo1(0)

⌨️ 快捷键说明

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