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

📄 frmsearchinfo.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 frmsearchInfo 
   BackColor       =   &H00C0C0C0&
   Caption         =   "Form1"
   ClientHeight    =   7410
   ClientLeft      =   9195
   ClientTop       =   1965
   ClientWidth     =   10080
   LinkTopic       =   "Form1"
   ScaleHeight     =   7410
   ScaleWidth      =   10080
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   8160
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      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 Command2 
      Caption         =   "退出(&E)"
      Height          =   495
      Left            =   8400
      TabIndex        =   10
      Top             =   1440
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询(&S)"
      Height          =   495
      Left            =   8400
      TabIndex        =   9
      Top             =   600
      Width           =   1215
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0C0C0&
      Caption         =   "学生基本信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   4575
      Left            =   240
      TabIndex        =   7
      Top             =   2520
      Width           =   9735
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "frmsearchInfo.frx":0000
         Height          =   4215
         Left            =   240
         TabIndex        =   8
         Top             =   240
         Width           =   9255
         _ExtentX        =   16325
         _ExtentY        =   7435
         _Version        =   393216
         BackColor       =   16777215
         HeadLines       =   1
         RowHeight       =   15
         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 VB.Frame Frame1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "查询依据"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2175
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   7695
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         Height          =   270
         Left            =   3120
         TabIndex        =   5
         Top             =   1305
         Width           =   2775
      End
      Begin VB.OptionButton Option4 
         BackColor       =   &H00C0C0C0&
         Caption         =   "院系"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   1800
         Width           =   855
      End
      Begin VB.OptionButton Option3 
         BackColor       =   &H00C0C0C0&
         Caption         =   "专业"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   1320
         Width           =   855
      End
      Begin VB.OptionButton Option2 
         BackColor       =   &H00C0C0C0&
         Caption         =   "班级"
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   840
         Width           =   855
      End
      Begin VB.OptionButton Option1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "学号"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "请输入查询依据"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3840
         TabIndex        =   6
         Top             =   840
         Width           =   1935
      End
   End
End
Attribute VB_Name = "frmsearchInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo searcherror
If Text1.Text <> "" Then
   If Option1.Value Then searchSQL = " select * from 学生表 where 学号='" & Trim(Text1.Text) & "'"
   If Option2.Value Then searchSQL = "select 学号,姓名,性别,班级 from 学生表 where 班级='" & Trim(Text1.Text) & "'"
   If Option3.Value Then searchSQL = " select 学号,姓名,性别,班级,专业 from 学生表 where 专业='" & Trim(Text1.Text) & "'"
   If Option4.Value Then searchSQL = "select 学号,姓名,性别,班级,院系,专业 from 学生表 where 院系='" & Trim(Text1.Text) & "'"
Else
   MsgBox "查询条件不能为空,请输入查询条件!"
   Text1.SetFocus
End If
Adodc1.RecordSource = searchSQL
Adodc1.Refresh
If Option1.Value Then
    If Adodc1.Recordset.EOF Then
      MsgBox "没有这个学生!"
    End If
End If
If Option2.Value Then
    If Adodc1.Recordset.EOF Then
      MsgBox "没有这个班级!"
    End If
End If
If Option3.Value Then
    If Adodc1.Recordset.EOF Then
      MsgBox "没有这个专业!"
    End If
End If
If Option4.Value Then
    If Adodc1.Recordset.EOF Then
      MsgBox "没有这个院系!"
    End If
End If
Exit Sub
searcherror:
     MsgBox Err.Description
End Sub

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

Private Sub Form_Load()
MakeCenter frmsearchInfo
End Sub

⌨️ 快捷键说明

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