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

📄 frmquery.frm

📁 这是一个实际的工程中所用的源程序
💻 FRM
📖 第 1 页 / 共 2 页
字号:
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 = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form frmQuery 
   BackColor       =   &H00C0FFC0&
   Caption         =   "查询及报表"
   ClientHeight    =   6465
   ClientLeft      =   195
   ClientTop       =   615
   ClientWidth     =   8010
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmQuery.frx":0000
   ScaleHeight     =   6465
   ScaleWidth      =   8010
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc adoShape 
      Height          =   330
      Left            =   7380
      Top             =   5760
      Visible         =   0   'False
      Width           =   1725
      _ExtentX        =   3043
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      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            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0FFC0&
      Height          =   585
      Left            =   60
      TabIndex        =   4
      Top             =   5790
      Width           =   4695
      Begin VB.OptionButton Option1 
         BackColor       =   &H00C0FFC0&
         Caption         =   "3#泊位"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   1
         Left            =   3600
         TabIndex        =   6
         Top             =   210
         Width           =   945
      End
      Begin VB.OptionButton Option1 
         BackColor       =   &H00C0FFC0&
         Caption         =   "2#泊位"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   0
         Left            =   2340
         TabIndex        =   5
         Top             =   210
         Value           =   -1  'True
         Width           =   915
      End
      Begin MSComCtl2.DTPicker dtpDate 
         Height          =   315
         Index           =   0
         Left            =   600
         TabIndex        =   7
         ToolTipText     =   "开始时间"
         Top             =   180
         Width           =   1635
         _ExtentX        =   2884
         _ExtentY        =   556
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         CalendarBackColor=   8454016
         Format          =   24576000
         CurrentDate     =   37205
      End
      Begin VB.Label Label1 
         BackColor       =   &H00C0FFC0&
         Caption         =   "日期"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000007&
         Height          =   195
         Index           =   4
         Left            =   120
         TabIndex        =   8
         Top             =   240
         Width           =   435
      End
   End
   Begin VB.PictureBox Picture1 
      Height          =   435
      Left            =   5010
      ScaleHeight     =   375
      ScaleWidth      =   2715
      TabIndex        =   3
      Top             =   5910
      Width           =   2775
      Begin VB.CommandButton cmdClose 
         BackColor       =   &H00FFC0FF&
         Caption         =   "退   出"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1800
         Style           =   1  'Graphical
         TabIndex        =   0
         ToolTipText     =   "退出"
         Top             =   0
         Width           =   900
      End
      Begin VB.CommandButton cmd打印 
         BackColor       =   &H00FFC0FF&
         Caption         =   "月报表"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   900
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   0
         Width           =   900
      End
      Begin VB.CommandButton cmd明细 
         BackColor       =   &H00FFC0FF&
         Caption         =   "查   询"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   0
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   0
         Width           =   900
      End
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid MFlex 
      Height          =   5205
      Left            =   0
      TabIndex        =   9
      TabStop         =   0   'False
      Top             =   0
      Width           =   5790
      _ExtentX        =   10213
      _ExtentY        =   9181
      _Version        =   393216
      ForeColor       =   16711680
      Cols            =   4
      FixedCols       =   0
      BackColorFixed  =   8421376
      ForeColorFixed  =   -2147483643
      BackColorBkg    =   -2147483644
      GridColor       =   9877635
      AllowBigSelection=   0   'False
      FocusRect       =   0
      HighLight       =   2
      SelectionMode   =   1
      AllowUserResizing=   3
      BorderStyle     =   0
      Appearance      =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty FontFixed {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _NumberOfBands  =   2
      _Band(0).Cols   =   4
      _Band(0).GridLinesBand=   1
      _Band(0).TextStyleBand=   0
      _Band(0).TextStyleHeader=   0
      _Band(1).BandIndent=   1
      _Band(1).Cols   =   16
   End
   Begin VB.Menu mnuPop 
      Caption         =   "【选    项】"
      Visible         =   0   'False
      Begin VB.Menu mnu月报表 
         Caption         =   "单机月报表"
      End
   End
End
Attribute VB_Name = "frmQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim iRecordCount As Long '查询结果的记录数
Dim nmRow As String '设备号
Dim nmSB As String '设备名称
Dim rptSum1 As String '单台报表的求和
Dim rptSum2 As String
'
'


'*********************** cmd查询,cmd打印 **************************************************************
'
Private Sub cmdClose_Click()
Unload Me
End Sub

'
'
Private Sub dtpDate_Validate(Index As Integer, Cancel As Boolean)
    Dim msg As String
    Dim bErr As Boolean
    If Index = 0 Then
        If dtpDate(0).Year < 2004 Or dtpDate(0).Year > Year(Date) Then
            msg = "没有此年的数据!"
            bErr = True
        Else
            If Dir(PATH_Year(Date)) = "" Then
                msg = "没有此年的数据!"
               bErr = True
            End If
         End If
    End If
    If Index = 1 Then
'        If dtpDate(1).Month <> dtpDate(0).Month Then
'            msg = "不能跨月度查询."
'            bErr = True
'        End If
        If dtpDate(0).Value > dtpDate(1).Value Then
           msg = "错:起点日期大于终点日期!"
            bErr = True
        End If
    End If
    If bErr Then
        If MsgBox(msg, vbExclamation + vbRetryCancel, "日期区间选择错误") = vbRetry Then
             Cancel = True
         Else
             Cancel = False
         End If
    Else
    End If
End Sub
'

Private Sub Form_Resize()
    On Error Resume Next
    If Me.ScaleWidth > 1000 Then
    MFlex.Width = Me.ScaleWidth
    End If
    If Me.ScaleHeight > 1500 Then
    Frame2.Top = Me.ScaleHeight - Frame2.Height - 30
    MFlex.Top = 0
    MFlex.Height = Frame2.Top - MFlex.Top - 30

⌨️ 快捷键说明

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