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

📄 main_gzcx.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 = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form main_gzcx 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "挂帐查询"
   ClientHeight    =   3720
   ClientLeft      =   120
   ClientTop       =   405
   ClientWidth     =   9585
   Icon            =   "main_gzcx.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3720
   ScaleWidth      =   9585
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin MSDataListLib.DataCombo DComgzdw 
      Height          =   330
      Left            =   2280
      TabIndex        =   7
      Top             =   120
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   582
      _Version        =   393216
      Text            =   ""
   End
   Begin VB.TextBox czy 
      BackColor       =   &H80000004&
      BorderStyle     =   0  'None
      Height          =   255
      Left            =   780
      TabIndex        =   6
      Top             =   3180
      Width           =   1305
   End
   Begin VB.CommandButton cmdquit 
      Caption         =   "退出"
      Height          =   330
      Left            =   7200
      TabIndex        =   0
      Top             =   3240
      Width           =   2115
   End
   Begin MSComCtl2.DTPicker DTP1 
      Height          =   285
      Left            =   6030
      TabIndex        =   2
      Top             =   90
      Width           =   1425
      _ExtentX        =   2514
      _ExtentY        =   503
      _Version        =   393216
      Format          =   23789569
      CurrentDate     =   37132
   End
   Begin MSComCtl2.DTPicker DTP2 
      Height          =   285
      Left            =   7830
      TabIndex        =   3
      Top             =   90
      Width           =   1410
      _ExtentX        =   2487
      _ExtentY        =   503
      _Version        =   393216
      Format          =   23789569
      CurrentDate     =   37132
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   2535
      Left            =   120
      TabIndex        =   8
      Top             =   480
      Width           =   9135
      _ExtentX        =   16113
      _ExtentY        =   4471
      _Version        =   393216
      AllowUpdate     =   0   'False
      BackColor       =   -2147483634
      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.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "操作员:"
      Height          =   225
      Left            =   60
      TabIndex        =   5
      Top             =   3210
      Width           =   720
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "日期                   到"
      Height          =   300
      Left            =   5505
      TabIndex        =   4
      Top             =   165
      Width           =   2505
   End
   Begin VB.Label Label1 
      Caption         =   "请选择挂帐单位名称:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   0
      TabIndex        =   1
      Top             =   135
      Width           =   2445
   End
End
Attribute VB_Name = "main_gzcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DBcnn As New ADODB.Connection
Dim DBrs As New ADODB.Recordset
Dim DBrs2 As New ADODB.Recordset
Public Sub CX()     '定义查询挂帐信息的函数
  Dim filterstr As String
  filterstr = filterstr & "日期>='" & Format(DTP1.Value, "yyyy-MM-dd") & "'"
  filterstr = filterstr & " and 日期<='" & Format(DTP2.Value, "yyyy-MM-dd") & "'"
  If DComgzdw.Text <> "" Then
    filterstr = filterstr & " and 挂账单位 like '%" & DComgzdw.Text & "%'"
  End If
  DBrs.Filter = filterstr
End Sub
Private Sub Form_Activate()
 Dim colname(10) As String
 Dim colwidth(10) As Integer
 colname(0) = "日期"
 colwidth(0) = 1320
 colname(1) = "挂账单位"
 colwidth(1) = 1860
 colname(2) = "摘要"
 colwidth(2) = 1140
 colname(3) = "住宿金额"
 colwidth(3) = 870
 colname(4) = "欠款金额"
 colwidth(4) = 870
 colname(5) = "还款金额"
 colwidth(5) = 870
 colname(6) = "金额累计"
 colwidth(6) = 870
 colname(7) = "姓名"
 colwidth(7) = 600
 colname(8) = "证件号码"
 colwidth(8) = 870
 colname(9) = "票号"
 colwidth(9) = 1500
 If DBcnn.State = 0 Then
    Dim connectstr As String
    connectstr = "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & _
               App.Path & "\KFGL.mdb;Persist Security Info=False"
    DBcnn.CursorLocation = adUseClient
    DBcnn.Open connectstr
 End If
 If DBrs.State = 1 Then
    DBrs.Close
 End If
 Dim sqlstr As String
 Dim sqlstr2 As String
 '筛选挂帐单位
 sqlstr2 = "select 挂账单位 from gzmx group by 挂账单位"
  sqlstr = "select * from gzmx order by 日期,时间"
 DBrs.Open sqlstr, DBcnn, adOpenStatic, adLockBatchOptimistic
 DBrs2.Open sqlstr2, DBcnn, adOpenStatic, adLockReadOnly
 Set DComgzdw.RowSource = DBrs2
 DComgzdw.ListField = DBrs2.Fields("挂账单位").Name
 Set DataGrid1.DataSource = DBrs
 For i = 0 To 9
    DataGrid1.Columns(i).DataField = DBrs.Fields(i).Name
 Next i
 For i = 0 To 9
    DataGrid1.Columns(i).Width = colwidth(i)
    DataGrid1.Columns(i).Caption = colname(i)
 Next i
 DataGrid1.Refresh
 czy.Text = main.StatusBar1.Panels(4).Text
 '初始化日期
 DTP1.Value = Date - 30
 DTP2.Value = Date
End Sub
Private Sub Form_Unload(Cancel As Integer)
 If DBrs.State = 1 Then
    DBrs.Close
 End If
 If DBrs2.State = 1 Then
    DBrs2.Close
 End If
 If DBcnn.State = 1 Then
    DBcnn.Close
 End If
 main.Enabled = True
End Sub
Private Sub DComgzdw_Change()     '查询挂帐信息
 '调用函数
 Call CX
End Sub
Private Sub DTP1_Change()
 '调用函数
 Call CX
End Sub
Private Sub DTP2_Change()
 '调用函数
 Call CX
End Sub
Private Sub cmdquit_Click()
 main.Enabled = True
 Unload Me
End Sub

⌨️ 快捷键说明

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