📄 wait_dh.frm
字号:
VERSION 5.00
Begin VB.Form wait_dh
ClientHeight = 1440
ClientLeft = 4065
ClientTop = 4170
ClientWidth = 3960
ControlBox = 0 'False
LinkTopic = "Form2"
LockControls = -1 'True
Moveable = 0 'False
ScaleHeight = 1440
ScaleWidth = 3960
Begin VB.TextBox m_ydd_h
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 2040
MaxLength = 12
TabIndex = 0
Text = "123456789012"
Top = 360
Width = 1335
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 = 2
Top = 360
Width = 1710
End
Begin VB.Label Label2
BackColor = &H80000018&
Height = 1455
Left = 0
TabIndex = 3
ToolTipText = "预定单前缀:散客 SK 团队 TD 长包 CB"
Top = 0
Width = 3975
End
Begin VB.Label MSG
AutoSize = -1 'True
BackColor = &H80000018&
ForeColor = &H00FF0000&
Height = 180
Left = 2400
TabIndex = 1
Top = 120
Width = 90
End
End
Attribute VB_Name = "wait_dh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim t_rec As Recordset 'MSFLEXGRID
Dim t_f As Boolean '返回类型
Dim dh As String '等待单号
Private Sub Form_Load()
KeyPreview = True
End Sub
Private Sub m_ydd_h_Change()
MSG.Caption = ""
End Sub
Private Sub m_ydd_h_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_ydd_h_LostFocus
End If
End Sub
Private Sub m_ydd_h_LostFocus()
If Not m_ydd_h.Text = "" Then
If Mid(UCase(Trim(m_ydd_h.Text)), 1, 2) = "SK" Or Mid(UCase(Trim(m_ydd_h.Text)), 1, 2) = "TD" Or Mid(UCase(Trim(m_ydd_h.Text)), 1, 2) = "CB" Then
If Len(Trim(m_ydd_h.Text)) = 12 Then
Set t_rec = PUB_data.OpenRecordset("SELECT YDD_H FROM YD_WAIT Where Trim(YDD_H)='" & UCase(Trim(m_ydd_h.Text)) & "'", 4)
If t_rec.BOF Then
MSG.Caption = "无效预订单号!"
m_ydd_h.SetFocus
m_ydd_h.SelStart = 0
m_ydd_h.SelLength = Len(Trim(m_ydd_h.Text))
Else
t_rec.MoveLast
dh = UCase(Trim(m_ydd_h.Text))
t_f = True
Unload Me
End If
t_rec.Close
'单号未达12位
Else
MSG.Caption = "无效预订单号!"
m_ydd_h.SetFocus
m_ydd_h.SelStart = 0
m_ydd_h.SelLength = Len(Trim(m_ydd_h.Text))
End If
'非SK,TD,CB...
Else
MSG.Caption = "无效预订单号!"
m_ydd_h.SetFocus
m_ydd_h.SelStart = 0
m_ydd_h.SelLength = Len(Trim(m_ydd_h.Text))
End If
'单号为空,返回
Else
t_f = False
Unload Me
End If
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then
t_f = False
Unload Me
End If
End Sub
'返回类型
Public Property Get tf() As Boolean
tf = t_f
End Property
Public Property Let tf(t As Boolean)
t = tf
End Property
'等待单号
Public Property Get wait_dh() As String
wait_dh = dh
End Property
Public Property Let wait_dh(wait_h As String)
wait_h = wait_dh
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -