Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\KFGL.MDB" '自动识别数据库路径
End Sub
Private Sub Form_Unload(Cancel As Integer)
main.Enabled = True
End Sub
Private Sub Text1_Change() '按客人姓名查询退宿信息
Data1.RecordSource = "select * from tfd where tfd.姓名 like " + Chr(34) + Text1.Text + "*" + Chr(34) + ""
Data1.Refresh
End Sub
Private Sub Command1_Click() '允许修改退宿记录
DBGrid1.AllowUpdate = True
End Sub
Private Sub Command2_Click() '删除退宿记录
If Data1.Recordset.RecordCount > 0 Then
Data1.Recordset.Delete
Data1.Refresh
End If
End Sub
Private Sub Command3_Click()
main.Enabled = True
Unload Me
End Sub
6.6.3宿费提醒
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\KFGL.MDB" '自动识别数据库路径
DTP1.Value = Date
End Sub
Private Sub Form_Unload(Cancel As Integer)
main.Enabled = True
End Sub
Private Sub Command1_Click() '所有被提醒的客人
Data1.RecordSource = "select * from djb where 标志='1'order by 凭证号码"
Data1.Refresh
End Sub
Private Sub Command2_Click() '按设定的日期被提醒的客人
Data1.RecordSource = "select * from djb where djb.提醒日期 < " + Chr(35) + Str(DTP1.Value) + Chr(35) + "or djb.提醒日期 =" + Chr(35) + Str(DTP1.Value) + Chr(35) + "and djb.标志 like " + Chr(34) + "1" + Chr(34) + "order by 凭证号码"
Data1.Refresh
End Sub
Private Sub Command3_Click()
main.Enabled = True
Unload Me
End Sub
6.7日结设计
6.7.1客房销售报表
Private Sub Form_Load()
'自动识别数据库路径
Data1.DatabaseName = App.Path & "\KFGL.MDB"
Data2.DatabaseName = App.Path & "\KFGL.MDB"
czy.Text = main.StatusBar1.Panels(4).Text
DTP1.Value = Date - 1: DTP2.Value = Date
End Sub
Private Sub Form_Activate()
G1.Text = Left(DTP1, 4) & Right(Left(DTP1, 7), 2) & Right(DTP1, 2) & Left(DTM1, 2) & Left(Right(DTM1, 5), 2)
G2.Text = Left(DTP2, 4) & Right(Left(DTP2, 7), 2) & Right(DTP2, 2) & Left(DTM2, 2) & Left(Right(DTM2, 5), 2)
Data1.RecordSource = "select * from tfd where tfd.BZ >" & Val(G1.Text) & " AND tfd.BZ<" & Val(G2.Text) & " order by 凭证号码"
Data1.Refresh
'统计各项费用
Data2.RecordSource = "select count(*)as 数量1,sum(应收宿费)as 应收宿费1,sum(杂费)as 杂费1,sum(电话费)as 电话费1 ,sum(会议费)as 会议费1,sum(存车费)as 存车费1,sum(赔偿费)as 赔偿费1,sum(金额总计)as 总计金额1,sum(预收宿费)as 预收宿费1,sum(退还宿费)as 退还宿费1 from tfd where tfd.BZ >" & Val(G1.Text) & "AND tfd.bz<" & Val(G2.Text)
Data2.Refresh
'设置MSFlexgrid的列宽
MS1.ColWidth(0) = 0: MS1.ColWidth(1) = 1500: MS1.ColWidth(2) = 600
MS1.ColWidth(3) = 0: MS1.ColWidth(4) = 0: MS1.ColWidth(5) = 0
MS1.ColWidth(7) = 600: MS1.ColWidth(8) = 0: MS1.ColWidth(9) = 450
MS1.ColWidth(10) = 0: MS1.ColWidth(11) = 0: MS1.ColWidth(12) = 450
MS1.ColWidth(13) = 0: MS1.ColWidth(14) = 840: MS1.ColWidth(15) = 450
MS1.ColWidth(16) = 900: MS1.ColWidth(17) = 450: MS1.ColWidth(18) = 780
MS1.ColWidth(19) = 780: MS1.ColWidth(20) = 780: MS1.ColWidth(21) = 780
MS1.ColWidth(22) = 780: MS1.ColWidth(23) = 780: MS1.ColWidth(24) = 780
MS1.ColWidth(25) = 0: MS1.ColWidth(26) = 0: MS1.ColWidth(27) = 0
MS1.ColWidth(28) = 0: MS1.ColWidth(29) = 0: MS1.ColWidth(30) = 0
MS1.ColWidth(31) = 0: MS1.ColWidth(6) = 0
MS2.ColWidth(0) = 4950: MS2.ColWidth(1) = 900: MS2.ColWidth(2) = 450
MS2.ColWidth(3) = 780: MS2.ColWidth(4) = 780: MS2.ColWidth(5) = 780
MS2.ColWidth(6) = 780: MS2.ColWidth(7) = 780: MS2.ColWidth(8) = 780
MS2.ColWidth(9) = 780
'设置下面各列的标题
MS1.TextMatrix(0, 9) = "房价": MS1.TextMatrix(0, 25) = "押金"
MS1.TextMatrix(0, 12) = "天数": MS1.TextMatrix(0, 14) = "结款方式"
MS1.TextMatrix(0, 17) = "杂费": MS1.TextMatrix(0, 22) = "实收金额"
MS2.TextMatrix(0, 0) = "合计"
End Sub
Private Sub Command1_Click()
Form_Activate
End Sub
Private Sub Command2_Click()
main.Enabled = True
Unload Me
End Sub
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>