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

📄 frmdzquery.frm

📁 图书馆管理系统 对图书进行管理
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmdzquery 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "查询统计"
   ClientHeight    =   5085
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9870
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5085
   ScaleWidth      =   9870
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   7920
      Top             =   4680
      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=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from lbtb"
      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 MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "frmdzquery.frx":0000
      Height          =   3015
      Left            =   120
      TabIndex        =   12
      Top             =   1680
      Width           =   9615
      _ExtentX        =   16960
      _ExtentY        =   5318
      _Version        =   393216
      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
      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
   Begin VB.Frame Frame1 
      Height          =   1455
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   9615
      Begin VB.CheckBox Check3 
         Caption         =   "登记查询"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   1080
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   4320
         TabIndex        =   8
         Top             =   960
         Width           =   3135
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   3120
         TabIndex        =   7
         Top             =   960
         Width           =   1095
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1440
         TabIndex        =   6
         Top             =   960
         Width           =   1575
      End
      Begin VB.CommandButton Command2 
         Caption         =   "退  出"
         Height          =   375
         Left            =   7920
         TabIndex        =   10
         Top             =   720
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确  定"
         Height          =   375
         Left            =   7920
         TabIndex        =   9
         Top             =   240
         Width           =   1455
      End
      Begin MSComCtl2.DTPicker DTPicker2 
         Height          =   375
         Left            =   4680
         TabIndex        =   5
         Top             =   240
         Width           =   2775
         _ExtentX        =   4895
         _ExtentY        =   661
         _Version        =   393216
         Format          =   24444929
         CurrentDate     =   38304
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   1440
         TabIndex        =   4
         Top             =   240
         Width           =   2775
         _ExtentX        =   4895
         _ExtentY        =   661
         _Version        =   393216
         Format          =   24444929
         CurrentDate     =   38304
      End
      Begin VB.CheckBox Check2 
         Caption         =   "输入查询"
         Height          =   375
         Left            =   240
         TabIndex        =   2
         Top             =   600
         Width           =   1095
      End
      Begin VB.CheckBox Check1 
         Caption         =   "出生年月"
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "至:"
         Height          =   255
         Left            =   4320
         TabIndex        =   11
         Top             =   360
         Width           =   375
      End
   End
End
Attribute VB_Name = "frmdzquery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If Check1.Value = 0 And Check3.Value = 0 And Check2.Value = 1 Then
        Select Case Combo2.Text
            Case Is = "like"
                Adodc1.RecordSource = "select * from dzxxtb where(dzxxtb." & Combo1.Text & " like'% '+ '" + Text1.Text + "'+ '%')"
                Adodc1.Refresh
            Case Is = "="
                Adodc1.RecordSource = "select * from dzxxtb where(dzxxtb." & Combo1.Text & "='" + Text1.Text + "')"
                Adodc1.Refresh
        End Select
    End If
    If Check1.Value = 1 And Check3.Value = 0 And Check2.Value = 0 Then
        Adodc1.RecordSource = "select * from dzxxtb where dzxxtb.出生日期 between'" + Str(DTPicker1.Value) + "' and '" + Str(DTPicker2.Value) + "'"
        Adodc1.Refresh
    ElseIf Check1.Value = 0 And Check3.Value = 1 And Check2.Value = 0 Then
           Adodc1.RecordSource = "select * from dzxxtb where dzxxtb.登记日期 between'" + Str(DTPicker1.Value) + "' and '" + Str(DTPicker2.Value) + "'"
           Adodc1.Refresh
    End If
    If Check1.Value = 1 And Check2.Value = 1 Then
        Select Case Combo2.Text
            Case Is = "like"
                Adodc1.RecordSource = "select * from dzxxtb where(dzxxtb." & Combo1.Text & " like '%' +'" + Text1.Text + "'+'%'and dzxxtb.出生日期 between '" + Str(DTPicker1.Value) + "' and '" + Str(DTPicker2.Value) + "')"
                Adodc1.Refresh
            Case Is = "="
            Adodc1.RecordSource = "select * from dzxxtb where (dzxxtb." & Combo1.Text & " = '" + Text1.Text + "' and dzxxtb.出生日期 between '" + Str(DTPicker1.Value) + "' and '" + Str(DTPicker2.Value) + "')"
            Adodc1.Refresh
        End Select
    ElseIf Check3.Value = 1 And Check2.Value = 1 Then
        Select Case Combo2.Text
            Case Is = "like"
                Adodc1.RecordSource = "select * from dzxxtb where(dzxxtb." & Combo1.Text & " like '%' +'" + Text1.Text + "'+'%'and dzxxtb.登记日期 between '" + Str(DTPicker1.Value) + "' and '" + Str(DTPicker2.Value) + "')"
                Adodc1.Refresh
            Case Is = "="
            Adodc1.RecordSource = "select * from dzxxtb where (dzxxtb." & Combo1.Text & " = '" + Text1.Text + "' and dzxxtb.登记日期 between '" + Str(DTPicker1.Value) + "' and '" + Str(DTPicker2.Value) + "')"
            Adodc1.Refresh
        End Select
    End If
End Sub

Private Sub Command2_Click()
    Me.Hide
End Sub

Private Sub Form_Activate()
    Combo1.AddItem "读者编号"
    Combo1.AddItem "性别"
    Combo1.AddItem "读者姓名"
    Combo1.AddItem "手机"
    Combo1.AddItem "Email"
    Combo2.AddItem "like"
    Combo2.AddItem "="
    Combo2.ListIndex = 0
    Me.Caption = Me.Caption & "     " & frmmain.StatusBar1.Panels(2).Text
    DTPicker1.Value = Date - 30
    DTPicker2.Value = Date
End Sub


⌨️ 快捷键说明

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