📄 main_xstj.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form main_xstj
BackColor = &H8000000B&
BorderStyle = 1 'Fixed Single
Caption = "客房销售统计"
ClientHeight = 3930
ClientLeft = 45
ClientTop = 480
ClientWidth = 9285
Icon = "main_xstj.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3930
ScaleWidth = 9285
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 2520
Top = 4200
Width = 2055
_ExtentX = 3625
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\宾馆客房管理系统\宾馆客房管理系统\DB_KFGL.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\宾馆客房管理系统\宾馆客房管理系统\DB_KFGL.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tb_tfd"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 3015
Left = 60
TabIndex = 7
Top = 840
Width = 9180
_ExtentX = 16193
_ExtentY = 5318
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.TextBox czy
BackColor = &H80000000&
BorderStyle = 0 'None
Height = 225
Left = 840
TabIndex = 3
Top = 255
Width = 1380
End
Begin VB.Frame Frame1
Height = 675
Left = 60
TabIndex = 0
Top = -15
Width = 9180
Begin VB.ComboBox Combo1
Height = 300
Left = 3660
TabIndex = 6
Top = 225
Width = 1560
End
Begin VB.CommandButton Command1
Caption = "确定"
CausesValidation= 0 'False
Height = 345
Left = 5625
Style = 1 'Graphical
TabIndex = 5
Top = 225
Width = 1665
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 345
Left = 7290
Style = 1 'Graphical
TabIndex = 1
Top = 225
Width = 1665
End
Begin VB.Label Label2
Caption = "操作员"
Height = 300
Left = 60
TabIndex = 4
Top = 285
Width = 765
End
Begin VB.Label Label1
Caption = "请选择汇总年份: "
Height = 285
Left = 2220
TabIndex = 2
Top = 285
Width = 2385
End
End
End
Attribute VB_Name = "main_xstj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load() '自动识别数据库路径
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB_KFGL.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from tb_tfd"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
Private Sub Form_Activate()
czy.text = Main.StatusBar1.Panels(4).text '赋值给czy.text
'添加年份列表
For i = 1999 To 2010
Combo1.AddItem (i) & 年
Next i
Combo1.ListIndex = 3
Adodc1.RecordSource = "select count(*)as 记录数, sum(应收宿费)as 应收宿费合计,sum(杂费)as 杂费合计, sum(电话费)as 电话费合计,sum(会议费)as 会议费合计, sum(存车费)as 存车费合计,sum(赔偿费)as 赔偿费合计,sum(金额总计)as 实收金额合计,sum(预收宿费)as 预收宿费合计,sum(退还宿费)as 退还宿费合计 from tb_tfd where tb_tfd.BZ like '%" + Left(Combo1.text, 4) + "%'"
Adodc1.Refresh
End Sub
Private Sub Form_Unload(Cancel As Integer)
Main.Enabled = True
End Sub
Private Sub Command1_Click() '统计客房销售信息
Adodc1.RecordSource = "select count(*)as 记录数, sum(应收宿费)as 应收宿费合计,sum(杂费)as 杂费合计, sum(电话费)as 电话费合计,sum(会议费)as 会议费合计, sum(存车费)as 存车费合计,sum(赔偿费)as 赔偿费合计,sum(金额总计)as 实收金额合计,sum(预收宿费)as 预收宿费合计,sum(退还宿费)as 退还宿费合计 from tb_tfd where tb_tfd.BZ like '%" + Left(Combo1.text, 4) + "%'"
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
Main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -