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

📄 frmsqlbdate.frm

📁 ktv场所的包房开房、迎宾、预定管理系统。
💻 FRM
字号:
VERSION 5.00
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 frmsqlbdate 
   Caption         =   "生日查询"
   ClientHeight    =   6435
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11880
   LinkTopic       =   "Form1"
   ScaleHeight     =   6435
   ScaleWidth      =   11880
   StartUpPosition =   1  '所有者中心
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1 
      Height          =   5280
      Left            =   150
      TabIndex        =   9
      Top             =   990
      Width           =   11595
      _ExtentX        =   20452
      _ExtentY        =   9313
      _Version        =   393216
      SelectionMode   =   1
      AllowUserResizing=   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _NumberOfBands  =   1
      _Band(0).Cols   =   2
   End
   Begin VB.Frame Frame1 
      Height          =   660
      Left            =   165
      TabIndex        =   4
      Top             =   225
      Width           =   4980
      Begin VB.ComboBox Combo1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   3660
         TabIndex        =   5
         Text            =   "Combo1"
         Top             =   225
         Width           =   1230
      End
      Begin MSComCtl2.DTPicker DTPicker2 
         Height          =   300
         Left            =   1065
         TabIndex        =   6
         Top             =   255
         Width           =   1470
         _ExtentX        =   2593
         _ExtentY        =   529
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         CustomFormat    =   "yyyy-MM-dd"
         Format          =   62324739
         CurrentDate     =   37828
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "查询条件:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Index           =   0
         Left            =   2670
         TabIndex        =   8
         Top             =   300
         Width           =   945
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "查询日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Index           =   1
         Left            =   75
         TabIndex        =   7
         Top             =   300
         Width           =   945
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "导出(&O)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Index           =   3
      Left            =   6600
      TabIndex        =   3
      Top             =   405
      Width           =   1275
   End
   Begin VB.CommandButton Command1 
      Caption         =   "打印(&X)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Index           =   2
      Left            =   7920
      TabIndex        =   2
      Top             =   405
      Width           =   1275
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询(&Q)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Index           =   1
      Left            =   5250
      TabIndex        =   1
      Top             =   405
      Width           =   1275
   End
   Begin VB.CommandButton Command1 
      Cancel          =   -1  'True
      Caption         =   "退出(&X)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Index           =   0
      Left            =   9240
      TabIndex        =   0
      Top             =   405
      Width           =   1275
   End
End
Attribute VB_Name = "frmsqlbdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rsSupplier As ADODB.Recordset
Private Sub Command1_Click(Index As Integer)
    Dim strsql As String
    Dim mrc As ADODB.Recordset


    Select Case Index
        Case 0
            Unload Me
        Case 1
            If Me.Combo1.ListIndex = 0 Then
                Set mrc = New ADODB.Recordset
                strsql = "select c_id,c_fname,c_mname,c_baby1,c_sex1,c_bdate1,c_ad1,c_tl1"
                strsql = strsql & " ,c_baby2,c_sex2,c_bdate2,c_ad2,c_tl2"
                strsql = strsql & " from customer where format(c_bdate1,'MMdd')='" & Format(Me.DTPicker2.Value, "MMdd") & "'"
                strsql = strsql & " or format(c_bdate2,'MMdd')='" & Format(Me.DTPicker2.Value, "MMdd") & "'"
                mrc.Open strsql, DEjxc.Conjxc, adOpenDynamic, adLockOptimistic
                Set Me.MSHFlexGrid1.DataSource = mrc
                showtitle
            Else
                Set mrc = New ADODB.Recordset
                strsql = "select c_id,c_fname,c_mname,c_baby1,c_sex1,c_bdate1,c_ad1,c_tl1"
                strsql = strsql & " ,c_baby2,c_sex2,c_bdate2,c_ad2,c_tl2"
                strsql = strsql & " from customer where format(c_bdate1,'MM')='" & Format(Me.DTPicker2.Value, "MM") & "'"
                strsql = strsql & " or format(c_bdate2,'MM')='" & Format(Me.DTPicker2.Value, "MM") & "'"
                mrc.Open strsql, DEjxc.Conjxc, adOpenDynamic, adLockOptimistic
                Set Me.MSHFlexGrid1.DataSource = mrc
                showtitle
            End If
       
    End Select
End Sub

Private Sub Form_Load()

    Me.DTPicker2.Value = dteSysDate
    Me.Combo1.AddItem "按日期"
    Me.Combo1.AddItem "按月份"
    Me.Combo1.ListIndex = 0
    Command1_Click (1)
End Sub

Private Sub Form_Resize()
'    Me.DataGrid1.Height = Me.Height - 2000
'    Me.DataGrid1.Width = Me.Width - 450
End Sub


Public Sub showtitle()
        With MSHFlexGrid1
            .colWidth(0, 0) = 150
            .TextMatrix(0, 1) = "编号"
            .colWidth(1, 0) = 500
            .TextMatrix(0, 2) = "父亲姓名"
            .colWidth(2, 0) = 900
            .TextMatrix(0, 3) = "母亲姓名"
            .colWidth(3, 0) = 900
            .TextMatrix(0, 4) = "婴儿姓名1"
            .colWidth(4, 0) = 900
            .TextMatrix(0, 5) = "性别1"
            .colWidth(5, 0) = 500
            .TextMatrix(0, 6) = "出生年月1"
            .colWidth(6, 0) = 1000
            .TextMatrix(0, 7) = "联系地址1"
            .colWidth(7, 0) = 1800
            .TextMatrix(0, 8) = "联系电话1"
            .colWidth(8, 0) = 1000
            .TextMatrix(0, 9) = "婴儿姓名2"
            .colWidth(9, 0) = 900
            .TextMatrix(0, 10) = "性别2"
            .colWidth(10, 0) = 500
            .TextMatrix(0, 11) = "出生年月2"
            .colWidth(11, 0) = 1000
            .TextMatrix(0, 12) = "联系地址2"
            .colWidth(15, 0) = 1100
            .TextMatrix(0, 13) = "联系电话2"
            .colWidth(16, 0) = 800
        End With
End Sub

⌨️ 快捷键说明

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