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

📄 frmsearchcj.frm

📁 程序主要是关于学生成绩管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmsearchcj 
   BackColor       =   &H00C0C0C0&
   Caption         =   "Form1"
   ClientHeight    =   6345
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7035
   FillColor       =   &H00C0C0C0&
   ForeColor       =   &H00C0C0C0&
   LinkTopic       =   "Form1"
   ScaleHeight     =   6345
   ScaleWidth      =   7035
   StartUpPosition =   3  '窗口缺省
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "frmsearchcj.frx":0000
      Left            =   720
      List            =   "frmsearchcj.frx":000A
      TabIndex        =   10
      Text            =   "按学号排序"
      Top             =   5760
      Width           =   1575
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "查询依据"
      ForeColor       =   &H00000000&
      Height          =   1935
      Left            =   120
      TabIndex        =   4
      Top             =   120
      Width           =   6735
      Begin VB.TextBox Text1 
         BackColor       =   &H00C0FFFF&
         ForeColor       =   &H00000000&
         Height          =   270
         Left            =   2520
         TabIndex        =   8
         Top             =   840
         Width           =   2535
      End
      Begin VB.OptionButton Option1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "学号:"
         ForeColor       =   &H00000000&
         Height          =   300
         Left            =   240
         TabIndex        =   7
         Top             =   240
         Value           =   -1  'True
         Width           =   1335
      End
      Begin VB.OptionButton Option2 
         BackColor       =   &H00C0C0C0&
         Caption         =   "班号:"
         ForeColor       =   &H00000000&
         Height          =   495
         Left            =   240
         TabIndex        =   6
         Top             =   720
         Width           =   1335
      End
      Begin VB.OptionButton Option3 
         BackColor       =   &H00C0C0C0&
         Caption         =   "查询全部:"
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   240
         TabIndex        =   5
         Top             =   1440
         Width           =   1215
      End
      Begin VB.Label Label1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "请输入内容:"
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   3120
         TabIndex        =   9
         Top             =   480
         Width           =   1935
      End
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0C0C0&
      Caption         =   "显示成绩"
      ForeColor       =   &H00000000&
      Height          =   3135
      Left            =   120
      TabIndex        =   2
      Top             =   2400
      Width           =   6735
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "frmsearchcj.frx":0026
         Height          =   2535
         Left            =   240
         TabIndex        =   3
         Top             =   360
         Width           =   6255
         _ExtentX        =   11033
         _ExtentY        =   4471
         _Version        =   393216
         AllowUpdate     =   -1  'True
         BackColor       =   16777215
         ForeColor       =   0
         HeadLines       =   1
         RowHeight       =   15
         AllowAddNew     =   -1  'True
         AllowDelete     =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "学生成绩"
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   5760
      Top             =   5760
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      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=cj.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=cj.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 成绩表  where 学号='"" & trim(text1.text) & ""'"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   375
      Left            =   4680
      TabIndex        =   1
      Top             =   5760
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询"
      DownPicture     =   "frmsearchcj.frx":003B
      Height          =   375
      Left            =   2880
      TabIndex        =   0
      Top             =   5760
      Width           =   1095
   End
End
Attribute VB_Name = "frmsearchcj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
If Combo1.Text = "按成绩排序" Then
  searchSQL1 = "SELECT * FROM 成绩表  order by 成绩 desc"
Else
  searchSQL1 = "SELECT * FROM 成绩表  order by 学号 asc"
End If
Adodc1.RecordSource = searchSQL1
Adodc1.Refresh
DataGrid1.Refresh
End Sub

Private Sub Command1_Click()

On Error GoTo Error:
 
If Option1.Value Then
  If Text1.Text <> "" Then
     searchSQL = "SELECT * FROM 成绩表 WHERE 学号=" & "'" & Text1.Text & "'"
  Else
     MsgBox "条件不能为空"
     Text1.SetFocus
  End If
End If
If Option2.Value Then
  If Text1.Text <> "" Then
     searchSQL = "SELECT *  FROM 成绩表 where 学号 in (select 学号 from 学生表 where 班级= '" & Trim(Text1.Text) & " ')"
  Else
     MsgBox "条件不能为空"
     Text1.SetFocus
  End If
End If
     If Option3.Value Then searchSQL = "SELECT * FROM 成绩表 "
 

    Adodc1.RecordSource = searchSQL
    Adodc1.Refresh
    If Option1.Value Then
       If Adodc1.Recordset.EOF Then
          MsgBox "没有这个学生!"
       End If
       Exit Sub
    End If
    If Option2.Value Then
       If Adodc1.Recordset.EOF Then
          MsgBox "没有这个班级!"
       End If
       Exit Sub
    End If
    If Option3.Value Then
       If Adodc1.Recordset.EOF Then
          MsgBox "没有相应的信息!"
       End If
       Exit Sub
    End If
    Exit Sub
    
Error:
    MsgBox Err.Description
End Sub

Private Sub Command3_Click()
Adodc1.Recordset.Close
Unload Me
End Sub

Private Sub Form_Load()
 MakeCenter frmsearchcj

End Sub
'select 课程号,课程名称,成绩,备注 from 学生与课程 where 学号='" & Trim(Text1.Text) & "'

⌨️ 快捷键说明

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