📄 dymoney.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form dymoney
Caption = "抵压金"
ClientHeight = 3885
ClientLeft = 60
ClientTop = 345
ClientWidth = 10635
LinkTopic = "Form1"
ScaleHeight = 3885
ScaleWidth = 10635
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 495
Left = 7800
TabIndex = 4
Top = 120
Width = 1095
End
Begin MSFlexGridLib.MSFlexGrid msglist
Height = 2775
Left = 360
TabIndex = 3
Top = 840
Width = 10215
_ExtentX = 18018
_ExtentY = 4895
_Version = 393216
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 6600
TabIndex = 2
Top = 120
Width = 855
End
Begin VB.TextBox txtItem
Height = 375
Left = 5040
TabIndex = 1
Top = 120
Width = 1335
End
Begin VB.Label Label1
Caption = "本 日 预 收 款 一 览"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 0
Top = 120
Width = 4335
End
End
Attribute VB_Name = "dymoney"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public txtSQL As String
Dim mrc As ADODB.Recordset
Dim msgtext As String
Private Sub command1_click()
Dim txtSQL As String
If IsDate(txtItem.Text) Then
txtItem.Text = Format(txtItem.Text, "yyyy-mm-dd")
ShowData
Else
MsgBox "入库时间应输入日期(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
txtItem.SetFocus
Exit Sub
End If
End Sub
Private Sub Form_Load()
flagYedit = True
txtItem = Date
ShowTitle
End Sub
Private Sub ShowTitle()
Dim i As Integer
With msglist
.Cols = 8
.TextMatrix(0, 1) = "帐单号"
.TextMatrix(0, 2) = "顾客姓名"
.TextMatrix(0, 3) = "身份证号码"
.TextMatrix(0, 4) = "房间编号"
.TextMatrix(0, 5) = "入住日期"
.TextMatrix(0, 6) = "折扣"
.TextMatrix(0, 7) = "抵压金"
.FixedRows = 1
.FillStyle = flexFillRepeat
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.ColWidth(0) = 300
.ColWidth(1) = 1500
.ColWidth(2) = 1000
.ColWidth(3) = 2000
.ColWidth(4) = 1000
.ColWidth(5) = 1000
.ColWidth(6) = 1000
.ColWidth(7) = 800
.Row = 1
End With
End Sub
Private Sub ShowData()
Dim dy_money As Integer
dy_money = 0
Dim i As Integer
txtSQL = "select bookno,customname,customID,roomno,indate,discount,dymoney from bookin where indate='" & Trim(txtItem.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, msgtext)
With msglist
.Rows = 1
Do While Not mrc.EOF
.Rows = .Rows + 1
For i = 1 To mrc.Fields.Count
Select Case mrc.Fields(i - 1).Type
Case adDBDate
.TextMatrix(.Rows - 1, i) = Format(mrc.Fields(i - 1) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i) = mrc.Fields(i - 1) & ""
End Select
Next i
dy_money = mrc("dymoney") + dy_money
mrc.MoveNext
Loop
Text1.Text = dy_money
End With
mrc.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -