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

📄 scgl_ldkr_ldrq.frm

📁 该系统为酒店日常管理提供了很大的方便
💻 FRM
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form scgl_ldkr_ldrq 
   ClientHeight    =   1455
   ClientLeft      =   3585
   ClientTop       =   4170
   ClientWidth     =   3945
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   1455
   ScaleWidth      =   3945
   Begin MSMask.MaskEdBox m_ldrq 
      Height          =   255
      Left            =   2040
      TabIndex        =   3
      Top             =   360
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   450
      _Version        =   327680
      MaxLength       =   10
      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
      Mask            =   "####-##-##"
      PromptChar      =   " "
   End
   Begin VB.Label MSG 
      AutoSize        =   -1  'True
      BackColor       =   &H80000018&
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   2400
      TabIndex        =   0
      Top             =   120
      Width           =   90
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00C0FFFF&
      Caption         =   "请输入离店日期:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   1
      Top             =   360
      Width           =   1710
   End
   Begin VB.Label Label2 
      BackColor       =   &H80000018&
      Height          =   1455
      Left            =   0
      TabIndex        =   2
      Top             =   0
      Width           =   3975
   End
End
Attribute VB_Name = "scgl_ldkr_ldrq"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim t_rq As String
Dim t_nam As String
Dim tf As Boolean
Dim RQQ As Date
Dim response As String
Dim rec As Recordset


Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 27 Then
        tf = False
        Unload Me
    End If
End Sub

Private Sub Form_Load()
    KeyPreview = True
End Sub

Private Sub m_ldrq_Change()
    MSG.Caption = ""
End Sub

Private Sub m_ldrq_GotFocus()
    m_ldrq.Text = Format(Date - 1, "yyyy-mm-dd")
    m_ldrq.SelStart = 0
    m_ldrq.SelLength = Len(m_ldrq.Text)
End Sub

Private Sub m_ldrq_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
        If Not m_ldrq.Text = "    -  -  " Then
            t_rq = date_cl(m_ldrq)
            If Not t_rq = "F" Then
                m_ldrq = t_rq
            End If
            If IsDate(m_ldrq.Text) Then
                If CDate(m_ldrq.Text) < Date Then
                    t_nam = "KR" & year(Format(Date, "yyyy-mm-dd"))
                    Set rec = PUB_data.OpenRecordset("SELECT LDRQ,ZDH FROM  " & t_nam & " WHERE CSTR(LDRQ)='" & m_ldrq.Text & "'and LD_FT= '" & 1 & "' ", 4)
                    If Not rec.BOF Then
                        rec.MoveLast
                        RQQ = CDate(m_ldrq.Text)
                        tf = True
                        Unload Me
                        'yx_main.Show (1)
                    Else
                        response = MsgBox("无当天离店客人!是否查询其他离店日期?", vbOKCancel)
                        If response = 1 Then
                            m_ldrq.SelStart = 0
                            m_ldrq.SelLength = Len(m_ldrq.Text)
                        Else
                            tf = False
                            Unload Me
                        End If
                    End If
                Else
                    MSG.Caption = "无效日期!"
                    m_ldrq.SelStart = 0
                    m_ldrq.SelLength = Len(m_ldrq.Text)
                End If
            Else
                MSG.Caption = "无效日期!"
                m_ldrq.SelStart = 0
                m_ldrq.SelLength = Len(m_ldrq.Text)
            End If
        Else
            tf = False
            Unload Me
        End If
    End If
End Sub
'0:无符合条件记录;   1: 有;      2: ESC 返回
Public Property Get t_or_f() As Boolean
    t_or_f = tf
End Property

Public Property Let t_or_f(t As Boolean)
    t = t_or_f
End Property

Public Property Get rq() As Date
   rq = RQQ
End Property

Public Property Let rq(RRQ As Date)
    RRQ = rq
End Property

⌨️ 快捷键说明

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