📄 form1.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form1
Caption = "话费统计 1.0(临时) 小东:13939080845"
ClientHeight = 6270
ClientLeft = 60
ClientTop = 345
ClientWidth = 9465
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 6270
ScaleWidth = 9465
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text3
Appearance = 0 'Flat
Height = 270
Left = 7320
TabIndex = 13
Top = 3720
Width = 855
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
Height = 270
Left = 7320
TabIndex = 10
Top = 3240
Width = 855
End
Begin VB.CommandButton Command5
Caption = "分组统计(市话)"
Height = 255
Left = 6720
TabIndex = 9
Top = 2280
Width = 1695
End
Begin VB.CommandButton Command4
Caption = "长途"
Height = 255
Left = 8520
TabIndex = 8
Top = 960
Width = 735
End
Begin VB.CommandButton Command3
Caption = "市话"
Height = 255
Left = 7440
TabIndex = 7
Top = 960
Width = 735
End
Begin VB.CommandButton Command1
Caption = "分组统计(长途)"
Height = 255
Left = 6720
TabIndex = 5
Top = 1680
Width = 1695
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 270
Left = 7560
TabIndex = 4
Top = 240
Width = 1455
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "Form1.frx":1CCA
Height = 6255
Left = -840
TabIndex = 1
Top = 0
Width = 6735
_ExtentX = 11880
_ExtentY = 11033
_Version = 393216
BackColor = 14737632
ForeColorSel = 12632256
WordWrap = -1 'True
FocusRect = 0
SelectionMode = 1
Appearance = 0
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\Documents and Settings\ljd1\My Documents\db1.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 1680
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 6360
Width = 2055
End
Begin VB.CommandButton Command2
Caption = "所有通话"
Height = 255
Left = 6000
TabIndex = 0
Top = 960
Width = 1095
End
Begin VB.Label Label8
Height = 255
Left = 7200
TabIndex = 16
Top = 4680
Width = 1095
End
Begin VB.Label Label7
Height = 135
Left = 7200
TabIndex = 15
Top = 4560
Width = 1095
End
Begin VB.Label Label6
Caption = "市话话费:长途话费:"
Height = 375
Left = 6120
TabIndex = 14
Top = 4560
Width = 975
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "市话(分钟)"
Height = 180
Left = 6000
TabIndex = 12
Top = 3720
Width = 1080
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "长途(分钟)"
Height = 180
Left = 6000
TabIndex = 11
Top = 3240
Width = 1080
End
Begin VB.Line Line1
X1 = 5760
X2 = 9480
Y1 = 2880
Y2 = 2880
End
Begin VB.Label Label3
AutoSize = -1 'True
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 240
Left = -240
TabIndex = 6
Top = 6240
Width = 150
End
Begin VB.Label Label2
Caption = "SELECT 主叫,被叫,日期,时长,真正时长 From cdr where 主叫="
ForeColor = &H8000000B&
Height = 255
Left = 3360
TabIndex = 3
Top = 6480
Width = 5055
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "输入号码:"
ForeColor = &H80000008&
Height = 180
Left = 6600
TabIndex = 2
Top = 240
Width = 900
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text <> "" Then
Label3.Caption = "SELECT count(主叫) as 呼出,sum(时长) AS 通话秒数, sum(真正时长) AS 通话分钟, sum(话费) AS 金额 FROM cdr where left(str(被叫),6)<>86371 and 主叫=" + Text1.Text
Form3.Show
Form3.Caption = Form1.Text1.Text + "的长途分组查询!"
End If
End Sub
Private Sub Command2_Click()
If Text1.Text <> "" Then
Label2.Caption = Label2.Caption + Text1.Text
Form2.Show
Label2.Caption = "SELECT 主叫,被叫,日期,时长,真正时长 From cdr where 主叫="
End If
End Sub
Private Sub Command3_Click()
If Text1.Text <> "" Then
Label2.Caption = "SELECT 主叫,被叫,日期,时长,真正时长 From cdr where left(str(被叫),6)=86371 and 主叫=" + Text1.Text
Form2.Show
Label2.Caption = "SELECT 主叫,被叫,日期,时长,真正时长 From cdr where 主叫="
End If
End Sub
Private Sub Command4_Click()
If Text1.Text <> "" Then
Label2.Caption = "SELECT 主叫,被叫,日期,时长,真正时长 From cdr where left(str(被叫),6)<>86371 and 主叫=" + Text1.Text
Form2.Show
Label2.Caption = "SELECT 主叫,被叫,日期,时长,真正时长 From cdr where 主叫="
End If
End Sub
Private Sub Command5_Click()
If Text1.Text <> "" Then
Label3.Caption = "SELECT count(主叫) as 呼出,sum(时长) AS 通话秒数, sum(真正时长) AS 通话分钟, sum(话费) AS 金额 FROM cdr where left(str(被叫),6)=86371 and 主叫=" + Text1.Text
Form3.Show
Form3.Caption = Form1.Text1.Text + "的市话分组查询!"
End If
End Sub
Private Sub Form_Load()
Data1.RecordSource = "SELECT * From cdr"
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Label2.Caption = Label2.Caption + Text1.Text
Form2.Show
Label2.Caption = "SELECT 主叫,被叫,日期,时长,真正时长 From cdr where 主叫="
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -