Private Sub Form_Unload(Cancel As Integer)
gintBmode = 0
End Sub
Private Sub txtItem_Change(Index As Integer)
'有变化设置gblchange
mblChange = True
End Sub
Private Sub txtItem_GotFocus(Index As Integer)
txtItem(Index).SelStart = 0
txtItem(Index).SelLength = Len(txtItem(Index))
End Sub
Private Sub txtItem_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
EnterToTab KeyCode
End Sub
2:订房信息查询窗体源代码:
Option Explicit
'用于传递查询块
Private Sub chkItem_Click(Index As Integer)
If Index = 2 Then
cboYear(0).SetFocus
Else
txtItem(Index).SetFocus
End If
End Sub
Private Sub cmdExit_Click()
Me.Hide
End Sub
Private Sub cmdOK_Click()
Dim dBeginDate As String
Dim sQSql As String
If chkItem(0).Value = vbChecked Then
sQSql = " customname = '" & Trim(txtItem(0) & " ") & "'"
End If
If chkItem(1).Value = vbChecked Then
If Trim(sQSql & " ") = "" Then
sQSql = " roomno ='" & Trim(txtItem(1) & " ") & "'"
Else
sQSql = sQSql & " and roomno ='" & Trim(txtItem(1) & " ") & "'"
End If
End If
If chkItem(2).Value = vbChecked Then
dBeginDate = Format(CDate(cboYear(0) & "-" & cboMonth(0) & "-" & cboDay), "yyyy-mm-dd")
If Trim(sQSql & " ") = "" Then
sQSql = " indate ='" & dBeginDate & "'"
Else
sQSql = sQSql & " and indate ='" & dBeginDate & "'"
End If
End If
If Trim(sQSql) = "" Then
MsgBox "请设置查询条件!", vbOKOnly + vbExclamation, "警告"
Exit Sub
Else
If flagBedit Then
Unload frmBookin
End If
frmBookin.txtSQL = "select bookno,customname,customID,roomno,indate,discount,inmemo from
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页