📄 zzs_dh.frm
字号:
VERSION 5.00
Begin VB.Form zzs_dh
ClientHeight = 1440
ClientLeft = 4065
ClientTop = 4005
ClientWidth = 3975
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 1440
ScaleWidth = 3975
Begin VB.TextBox m_ydd_h
BackColor = &H00FFFFFF&
Height = 270
Left = 2280
MaxLength = 12
TabIndex = 0
Text = "123456789012"
Top = 360
Width = 1215
End
Begin VB.Label MSG
AutoSize = -1 'True
BackColor = &H80000018&
ForeColor = &H00FF0000&
Height = 180
Left = 2400
TabIndex = 3
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 = 2160
End
Begin VB.Label Label2
BackColor = &H80000018&
Height = 1455
Left = 0
TabIndex = 2
ToolTipText = "预定单前缀:散客 SK 团队 TD 长包 CB"
Top = 0
Width = 3975
End
End
Attribute VB_Name = "zzs_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_YDDK Where Trim(YDD_H)='" & UCase(Trim(m_ydd_h.Text)) & "'", 4)
If Not t_rec.BOF Then
t_rec.MoveLast
MSG.Caption = "无效预定单号!"
m_ydd_h.SetFocus
m_ydd_h.SelStart = 0
m_ydd_h.SelLength = Len(Trim(m_ydd_h.Text))
Else
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 zs_dh() As String
zs_dh = dh
End Property
Public Property Let zs_dh(ZSDH As String)
ZSDH = zs_dh
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -