📄 frm_dfcx.frm
字号:
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
ColumnWidth = 854.929
EndProperty
BeginProperty Column01
ColumnWidth = 854.929
EndProperty
BeginProperty Column02
ColumnWidth = 1214.929
EndProperty
BeginProperty Column03
ColumnWidth = 1170.142
EndProperty
BeginProperty Column04
ColumnWidth = 824.882
EndProperty
BeginProperty Column05
ColumnWidth = 854.929
EndProperty
BeginProperty Column06
ColumnWidth = 675.213
EndProperty
BeginProperty Column07
ColumnWidth = 900.284
EndProperty
BeginProperty Column08
ColumnWidth = 884.976
EndProperty
BeginProperty Column09
ColumnWidth = 1440
EndProperty
EndProperty
End
End
Begin VB.Frame Frame1
Height = 945
Left = 90
TabIndex = 0
Top = 60
Width = 7800
Begin VB.Frame Frame2
Height = 675
Left = 5910
TabIndex = 8
Top = 120
Width = 1650
Begin VB.CommandButton Command2
Caption = "退出"
Height = 345
Left = 840
TabIndex = 10
Top = 210
Width = 750
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 345
Left = 90
TabIndex = 9
Top = 210
Width = 750
End
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 300
Left = 4500
TabIndex = 7
Top = 375
Width = 1275
End
Begin VB.ComboBox Combo2
Enabled = 0 'False
Height = 300
ItemData = "frm_dfcx.frx":1C7A
Left = 3210
List = "frm_dfcx.frx":1C8A
Style = 2 'Dropdown List
TabIndex = 6
Top = 375
Width = 1290
End
Begin VB.ComboBox Combo1
Enabled = 0 'False
Height = 300
ItemData = "frm_dfcx.frx":1C9D
Left = 1695
List = "frm_dfcx.frx":1CA7
Style = 2 'Dropdown List
TabIndex = 5
Top = 375
Width = 1545
End
Begin VB.OptionButton Option2
Caption = "按计费日期查询"
Height = 330
Left = 105
TabIndex = 4
Top = 1155
Width = 1575
End
Begin VB.OptionButton Option1
Caption = "请选择查询条件"
Height = 375
Left = 90
TabIndex = 3
Top = 330
Width = 1665
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 345
Left = 4530
TabIndex = 1
Top = 1095
Width = 1275
_ExtentX = 2249
_ExtentY = 609
_Version = 393216
Enabled = 0 'False
Format = 65732609
CurrentDate = 39406
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 360
Left = 2430
TabIndex = 2
Top = 1095
Width = 1290
_ExtentX = 2275
_ExtentY = 635
_Version = 393216
Enabled = 0 'False
Format = 65732609
CurrentDate = 39406
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "结束日期"
Height = 180
Left = 3750
TabIndex = 12
Top = 1200
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "起始日期"
Height = 180
Left = 1710
TabIndex = 11
Top = 1215
Width = 720
End
End
End
Attribute VB_Name = "frm_dfcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
DTPicker1.Value = Date
DTPicker2.Value = Date
'自动识别路径
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from tab_dianmoney"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
'DataGrid控件显示并允许对Recordset对象中代表记录和字段的一系列行和列进行数据操纵。
End Sub
Private Sub Option1_Click() '请选择查询条件
Combo1.Enabled = True
Combo2.Enabled = True
Text1.Enabled = True
DTPicker1.Enabled = False
DTPicker2.Enabled = False
End Sub
Private Sub Option2_Click() '按计费日期查询
DTPicker1.Enabled = True
DTPicker2.Enabled = True
Combo1.Enabled = False
Combo2.Enabled = False
Text1.Enabled = False
End Sub
Private Sub Command1_Click() '查询
If Combo1.Enabled = True Then
If Combo2.Text = "like" Then
Adodc1.RecordSource = "select * from tab_dianmoney where " & Combo1.Text & " " & Combo2.Text & " '%" & Text1.Text & "%'"
Adodc1.Refresh
Else
Adodc1.RecordSource = "select * from tab_dianmoney where " & Combo1.Text & " " & Combo2.Text & " '" & Text1.Text & "'"
Adodc1.Refresh
End If
Else
Adodc1.RecordSource = "select * from tab_dianmoney where 计费起始日期=" + Chr(35) + Str(DTPicker1.Value) + Chr(35) + "and 计费终止日期=" + Chr(35) + Str(DTPicker2.Value) + Chr(35) + ""
'Str 函数返回代表一数值的 Variant (String)。
Adodc1.Refresh
End If
End Sub
Private Sub Command2_Click() '退出
Unload Me
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Command1.SetFocus '按回车键Command1获得焦点
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -