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

📄 frm_pbcx.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frm_pbcx 
   Caption         =   "保安信息查询"
   ClientHeight    =   3810
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7995
   Icon            =   "Frm_pbcx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3810
   ScaleWidth      =   7995
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   1485
      Top             =   4725
      Width           =   2040
      _ExtentX        =   3598
      _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         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      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.Frame Frame1 
      Height          =   870
      Left            =   135
      TabIndex        =   2
      Top             =   90
      Width           =   7725
      Begin VB.OptionButton Option2 
         Caption         =   "按日期查询"
         Height          =   330
         Left            =   105
         TabIndex        =   7
         Top             =   1140
         Width           =   1470
      End
      Begin VB.ComboBox Combo1 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "Frm_pbcx.frx":1C7A
         Left            =   1725
         List            =   "Frm_pbcx.frx":1C87
         Style           =   2  'Dropdown List
         TabIndex        =   6
         Top             =   345
         Width           =   1845
      End
      Begin VB.ComboBox Combo2 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "Frm_pbcx.frx":1CA7
         Left            =   3585
         List            =   "Frm_pbcx.frx":1CB7
         Style           =   2  'Dropdown List
         TabIndex        =   5
         Top             =   345
         Width           =   960
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Left            =   4560
         TabIndex        =   4
         Top             =   345
         Width           =   1230
      End
      Begin VB.Frame Frame2 
         Height          =   645
         Left            =   5910
         TabIndex        =   3
         Top             =   120
         Width           =   1710
         Begin VB.CommandButton Command2 
            Caption         =   "退出"
            Height          =   345
            Left            =   870
            TabIndex        =   14
            Top             =   165
            Width           =   735
         End
         Begin VB.CommandButton Command1 
            Caption         =   "查询"
            Height          =   345
            Left            =   90
            TabIndex        =   13
            Top             =   165
            Width           =   735
         End
      End
      Begin MSComCtl2.DTPicker DTPicker2 
         Height          =   345
         Left            =   4530
         TabIndex        =   9
         Top             =   1110
         Width           =   1290
         _ExtentX        =   2275
         _ExtentY        =   609
         _Version        =   393216
         Enabled         =   0   'False
         Format          =   65732609
         CurrentDate     =   39406
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   345
         Left            =   2430
         TabIndex        =   10
         Top             =   1110
         Width           =   1290
         _ExtentX        =   2275
         _ExtentY        =   609
         _Version        =   393216
         Enabled         =   0   'False
         Format          =   65732609
         CurrentDate     =   39406
      End
      Begin VB.OptionButton Option1 
         Caption         =   "请选择查询条件"
         Height          =   375
         Left            =   105
         TabIndex        =   8
         Top             =   345
         Width           =   1665
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "起始日期"
         Height          =   180
         Left            =   1695
         TabIndex        =   12
         Top             =   1200
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "结束日期"
         Height          =   180
         Left            =   3765
         TabIndex        =   11
         Top             =   1185
         Width           =   720
      End
   End
   Begin VB.Frame Frm_mqfxc 
      Caption         =   "保安排班信息列表:"
      Height          =   2655
      Left            =   135
      TabIndex        =   0
      Top             =   1005
      Width           =   7695
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "Frm_pbcx.frx":1CCA
         Height          =   2235
         Left            =   120
         TabIndex        =   1
         Top             =   270
         Width           =   7500
         _ExtentX        =   13229
         _ExtentY        =   3942
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         FormatLocked    =   -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
         ColumnCount     =   8
         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
         BeginProperty Column02 
            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 Column03 
            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 Column04 
            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 Column05 
            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 Column06 
            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 Column07 
            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 
               ColumnWidth     =   480.189
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   734.74
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   870.236
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   884.976
            EndProperty
            BeginProperty Column04 
               ColumnWidth     =   840.189
            EndProperty
            BeginProperty Column05 
               ColumnWidth     =   900.284
            EndProperty
            BeginProperty Column06 
               ColumnWidth     =   1349.858
            EndProperty
            BeginProperty Column07 
               ColumnWidth     =   1769.953
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "Frm_pbcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from tab_pb "
    Adodc1.Refresh

    DTPicker1.Value = Date
    DTPicker2.Value = Date
    Set DataGrid1.DataSource = Adodc1
End Sub

Private Sub Option1_Click()   '请选择查询条件
    'OptionButton 控件显示一个可以打开或者关闭的选项。
    Combo1.Enabled = True
    Combo2.Enabled = True
    Text1.Enabled = True
    DTPicker1.Enabled = False
    DTPicker2.Enabled = False
End Sub
Private Sub Option2_Click()   '按日期查询
    DTPicker1.Enabled = True
    DTPicker2.Enabled = True
    Combo1.Enabled = False
    Combo2.Enabled = False
    Text1.Enabled = False
End Sub
Private Sub Command1_Click()   '查询
    If Combo1.Enabled = True Then
        If Combo2.Text = "like" Then
            Adodc1.RecordSource = "select * from tab_pb where " & Combo1.Text & " like +'%" & Text1.Text & "%'"
            Adodc1.Refresh
        Else
            Adodc1.RecordSource = "select * from tab_pb where " & Combo1.Text & " " & Combo2.Text & " '" & Text1.Text & "'"
            Adodc1.Refresh
        End If
    Else
        Adodc1.RecordSource = "select * from tab_pb where 日期 between " + Chr(35) + Str(DTPicker1.Value) + Chr(35) + " and " + Chr(35) + Str(DTPicker2.Value) + Chr(35) + ""
        'Str 函数返回代表一数值的 Variant (String)。
        Adodc1.Refresh
    End If
End Sub
Private Sub Command2_Click()   '退出
    Unload Me
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Command1.SetFocus   '按回车键Command1获得焦点
End Sub

⌨️ 快捷键说明

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