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

📄 frmsearcharrearage.frm

📁 星级酒店管理系统(附带系统自写控件源码)
💻 FRM
字号:
VERSION 5.00
Object = "{29743316-0803-11D5-AD8E-0050BAA9AC14}#8.1#0"; "MOVEFO~1.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmSearcharrearage 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "查询挂帐单"
   ClientHeight    =   3360
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5280
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   12
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmSearcharrearage.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3360
   ScaleWidth      =   5280
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "放弃(&C)"
      Height          =   405
      Left            =   3645
      TabIndex        =   10
      Top             =   2700
      Width           =   1455
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "查询(&F)"
      Height          =   405
      Left            =   2145
      TabIndex        =   9
      Top             =   2700
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      Caption         =   "请输入查询条件"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2475
      Left            =   150
      TabIndex        =   11
      Top             =   165
      Width           =   4950
      Begin VB.CommandButton cmdSelectMember 
         Height          =   270
         Left            =   4245
         Picture         =   "frmSearcharrearage.frx":08CA
         Style           =   1  'Graphical
         TabIndex        =   4
         ToolTipText     =   "选择会员编号"
         Top             =   1215
         Width           =   345
      End
      Begin VB.OptionButton optYes 
         Caption         =   "已还挂帐单"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   345
         Left            =   3435
         TabIndex        =   8
         Top             =   1995
         Width           =   1290
      End
      Begin VB.OptionButton optNo 
         Caption         =   "未还挂帐单"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   345
         Left            =   2145
         TabIndex        =   7
         Top             =   1995
         Width           =   1245
      End
      Begin VB.OptionButton optAll 
         Caption         =   "所有挂帐单"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   345
         Left            =   840
         TabIndex        =   6
         Top             =   1995
         Value           =   -1  'True
         Width           =   1275
      End
      Begin 给出焦点文本框.FocusText ftSheelID 
         Height          =   300
         Left            =   1620
         TabIndex        =   0
         ToolTipText     =   "仅为数字,不能为小数点及文字?"
         Top             =   405
         Width           =   3000
         _ExtentX        =   5292
         _ExtentY        =   529
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BorderStyle     =   0
         PreControl      =   "cmdFind"
         NextControl     =   "ftMID"
         TextType        =   1
      End
      Begin MSComCtl2.DTPicker dtpStart 
         Height          =   315
         Left            =   1620
         TabIndex        =   1
         Top             =   795
         Width           =   1350
         _ExtentX        =   2381
         _ExtentY        =   556
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Format          =   23789569
         CurrentDate     =   37507
      End
      Begin MSComCtl2.DTPicker dtpEnd 
         Height          =   315
         Left            =   3270
         TabIndex        =   2
         Top             =   795
         Width           =   1350
         _ExtentX        =   2381
         _ExtentY        =   556
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Format          =   23789569
         CurrentDate     =   37507
      End
      Begin 给出焦点文本框.FocusText ftMID 
         Height          =   300
         Left            =   1620
         TabIndex        =   3
         Top             =   1200
         Width           =   3000
         _ExtentX        =   5292
         _ExtentY        =   529
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BorderStyle     =   0
         PreControl      =   "ftSheelID"
         NextControl     =   "ftName"
      End
      Begin 给出焦点文本框.FocusText ftName 
         Height          =   300
         Left            =   1620
         TabIndex        =   5
         Top             =   1590
         Width           =   3000
         _ExtentX        =   5292
         _ExtentY        =   529
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BorderStyle     =   0
         PreControl      =   "ftMID"
         NextControl     =   "cmdFind"
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "会员名称:"
         Height          =   300
         Index           =   3
         Left            =   540
         TabIndex        =   16
         Top             =   1590
         Width           =   1020
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "会员编号:"
         Height          =   300
         Index           =   2
         Left            =   540
         TabIndex        =   15
         Top             =   1200
         Width           =   1020
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "消费单号:"
         Height          =   300
         Index           =   1
         Left            =   540
         TabIndex        =   14
         Top             =   420
         Width           =   1020
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "挂帐日期:"
         Height          =   300
         Index           =   0
         Left            =   540
         TabIndex        =   13
         Top             =   810
         Width           =   1020
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "至"
         Height          =   300
         Index           =   1
         Left            =   3015
         TabIndex        =   12
         Top             =   802
         Width           =   240
      End
   End
End
Attribute VB_Name = "frmSearcharrearage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()

  MakeFind = False
  Unload Me
  
End Sub

Private Sub cmdFind_Click()
  
 '生产查询字符串
  Dim sFTmp As String, sOR As String
      sOR = " And "
      
  If IsSqlDat = True Then
    sFTmp = " Where (tbdArrearage.MDate>='" & dtpStart.Value & "' And tbdArrearage.MDate<='" & dtpEnd.Value & "')"
    Else
    sFTmp = " Where (tbdArrearage.MDate>=#" & dtpStart.Value & "# And tbdArrearage.MDate<=#" & dtpEnd.Value & "#)"
  End If
  If Trim(ftSheelID.Text) <> "" Then
     sFTmp = sFTmp & sOR & " tbdArrearage.SheelID=" & Trim(ftSheelID.Text)
  End If
    
  If Trim(ftMID.Text) <> "" Then
     sFTmp = sFTmp & sOR & " tbdArrearage.MID Like '%" & Trim(ftSheelID.Text) & "%'"
  End If
  
  If Trim(ftName.Text) <> "" Then
     sFTmp = sFTmp & sOR & " (tbdMember.Name Like '%" & Trim(ftName.Text) & "%')"
  End If
  
  If optNo.Value = True Then
    '未付款显示
     sFTmp = sFTmp & sOR & " (tbdArrearage.MReturn=0)"
    ElseIf optYes.Value = True Then
     sFTmp = sFTmp & sOR & " (tbdArrearage.MReturn=1)"
  End If
   
 '查询字符串
  sFindString = sFTmp
  
  MakeFind = True
  Unload Me
  
End Sub

Private Sub cmdSelectMember_Click()

   sGuestID = "": sGuestName = ""
  
   frmMemberSelect.Show 1
  
    If sGuestID = "" Then
        ftMID.SetFocus
        Exit Sub
      Else
        ftMID.Text = sGuestID
        ftName.Text = sGuestName
        cmdFind.SetFocus
    End If

End Sub

Private Sub Form_Load()

  dtpStart.Value = Date - 7
  dtpEnd.Value = Date
  GetFormSet Me, Screen
  
End Sub

Private Sub Form_Unload(Cancel As Integer)

  SaveFormSet Me
  
End Sub

Private Sub dtpEnd_Change()

   If dtpEnd.Value < dtpStart.Value Then
      MsgBox "结束日期小于开始日期,系统将自动修改开始日期。  ", vbExclamation
      dtpStart.Value = dtpEnd.Value
   End If
   
End Sub

Private Sub dtpStart_Change()
  
  If dtpEnd.Value < dtpStart.Value Then
      MsgBox "结束日期小于开始日期,系统将自动修改结束日期。  ", vbExclamation
      dtpEnd.Value = dtpStart.Value
  End If
   
End Sub

Private Sub ftMID_DblClick()

  Call cmdSelectMember_Click
  
End Sub

Private Sub ftSheelID_LostFocus()

  If ftSheelID.Text = "" Then Exit Sub
  
  If IsNumeric(ftSheelID.Text) = False Then
     MsgBox "必须为数字,系统将自动修改为 0  ?  ", vbExclamation
     ftSheelID.Text = "0"
     Exit Sub
  End If
  
End Sub

⌨️ 快捷键说明

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