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

📄 frmclassquery.frm

📁 员工培训管理系统vb+sql源代码+可执行文件+论文+开题报稿+答辩ppt,给需要的朋友参考参考
💻 FRM
字号:
VERSION 5.00
Object = "{CE671F01-259E-40DA-92FE-95803E2ECBB5}#1.0#0"; "SmartXPButton.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form FrmClassQuery 
   BackColor       =   &H00E7DFE7&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "培训计划查询"
   ClientHeight    =   5490
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6105
   Icon            =   "FrmClassQuery.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5490
   ScaleWidth      =   6105
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   3480
      Top             =   840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   1
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmClassQuery.frx":2CFA
            Key             =   "print"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Height          =   840
      Left            =   4440
      TabIndex        =   6
      Top             =   3120
      Width           =   825
      _ExtentX        =   1455
      _ExtentY        =   1482
      ButtonWidth     =   1032
      ButtonHeight    =   1376
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   1
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "打印"
            ImageKey        =   "print"
            Style           =   5
            BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628} 
               NumButtonMenus  =   2
               BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628} 
                  Key             =   "Current"
                  Text            =   "打印当前记录"
               EndProperty
               BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628} 
                  Key             =   "All"
                  Text            =   "打印全部记录"
               EndProperty
            EndProperty
         EndProperty
      EndProperty
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00E7DFE7&
      Caption         =   "查询条件"
      Height          =   3135
      Left            =   240
      TabIndex        =   7
      Top             =   2160
      Width           =   5655
      Begin VB.ComboBox cboplace 
         Height          =   300
         Left            =   1320
         TabIndex        =   2
         Top             =   1740
         Width           =   2295
      End
      Begin VB.ComboBox cbotime 
         Height          =   300
         Left            =   1320
         TabIndex        =   1
         Top             =   1140
         Width           =   2295
      End
      Begin VB.ComboBox cboproj 
         Height          =   300
         Left            =   1320
         TabIndex        =   0
         Top             =   540
         Width           =   2295
      End
      Begin SmartXPButton.XpButton cmdFind 
         Height          =   495
         Left            =   240
         TabIndex        =   3
         Top             =   2400
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   873
         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         =   "查找(&F)"
         CaptionMouseOverColor=   16711680
         PictureBackColor=   15790320
         PictureSmoothBackColor=   15790320
         ButtonPicture   =   "FrmClassQuery.frx":448C
      End
      Begin SmartXPButton.XpButton cmdExit 
         Cancel          =   -1  'True
         Height          =   495
         Left            =   2280
         TabIndex        =   4
         Top             =   2400
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   873
         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         =   "关闭(&E)"
         CaptionMouseOverColor=   16711680
         PictureBackColor=   15790320
         PictureSmoothBackColor=   15790320
         ButtonPicture   =   "FrmClassQuery.frx":686E
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "培训地点:"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   1800
         Width           =   900
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "培训时间:"
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   1200
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "培训项目:"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   600
         Width           =   900
      End
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid ClassQueryGrid 
      Height          =   1815
      Left            =   240
      TabIndex        =   5
      Top             =   120
      Width           =   5655
      _ExtentX        =   9975
      _ExtentY        =   3201
      _Version        =   393216
      BackColorFixed  =   15196135
      BackColorBkg    =   15196135
      BackColorUnpopulated=   15196135
      _NumberOfBands  =   1
      _Band(0).Cols   =   2
   End
End
Attribute VB_Name = "FrmClassQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ClassQuery As OpenRs


Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub Cmdfind_Click()
On Error Resume Next
Dim sql As String
Dim sql1 As String
Dim sql2 As String
Dim sql3 As String
sql = "select * from plan_info where 1=1"
If cboproj.Text <> "" Then
   sql1 = "and project='" & cboproj.Text & "'"
Else
   sql1 = " "
End If

If cbotime.Text <> "" Then
   sql2 = " and time='" & cbotime.Text & "'"
Else
   sql2 = " "
End If

If cboplace.Text <> "" Then
   sql3 = " and place='" & cboplace.Text & "'"
Else
   sql3 = " "
End If

sql = sql & sql1 & sql2 & sql3

ClassQuery.rsDK1 sql
If ClassQuery.rs1.EOF Then
    ClassQueryGrid.Clear
    ClassQueryGrid.FormatString = "|   培训项目   |        培训时间     |       培训地点      |"
    MsgBox "没有找到符合条件的记录!", vbOKOnly + vbInformation, "提示"
Else
ClassQuery.rsDK1 sql
   
    Set ClassQueryGrid.DataSource = ClassQuery.rs1
    ClassQueryGrid.FormatString = "|   培训项目   |        培训时间      |       培训地点      |"
End If
End Sub

Private Sub Form_Load()
On Error Resume Next
Set ClassQuery = New OpenRs
ClassQuery.rsDK1 "select * from plan_info"
    ClassQueryGrid.Clear
   
    Set ClassQueryGrid.DataSource = ClassQuery.rs1
    ClassQueryGrid.FormatString = "|   培训项目   |        培训时间     |       培训地点      |"

ClassQuery.rsDK1 "select distinct project from plan_info"
Do While ClassQuery.rs1.EOF = False
cboproj.AddItem ClassQuery.rs1!project
ClassQuery.rs1.MoveNext
Loop

ClassQuery.rsDK1 "select distinct time from plan_info"
Do While ClassQuery.rs1.EOF = False
cbotime.AddItem ClassQuery.rs1!Time
ClassQuery.rs1.MoveNext
Loop

ClassQuery.rsDK1 "select distinct place from plan_info"
ClassQuery.rs1.MoveFirst
Do While ClassQuery.rs1.EOF = False
cboplace.AddItem ClassQuery.rs1!place
ClassQuery.rs1.MoveNext
Loop

End Sub

Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
Select Case ButtonMenu.Key
Case "Current"
    Call Cmdfind_Click
   If Not ClassQuery.rs1.EOF Then
        ClassReport.Show
        Set ClassReport.DataSource = ClassQuery.rs1
   End If
Case "All"
  ClassQuery.rsDK1 "select * from plan_info"
    Set ClassReport.DataSource = ClassQuery.rs1
    ClassReport.Show
End Select
End Sub

⌨️ 快捷键说明

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