📄 frmrecordfind.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmRecordFind
Caption = "打开记录查询"
ClientHeight = 7932
ClientLeft = 48
ClientTop = 432
ClientWidth = 12096
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 7932
ScaleWidth = 12096
WindowState = 2 'Maximized
Begin VB.CommandButton Command1
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 9720
TabIndex = 14
Top = 600
Width = 1572
End
Begin VB.Frame Frame1
Caption = "查询条件"
BeginProperty Font
Name = "宋体"
Size = 11.4
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2412
Left = 360
TabIndex = 3
Top = 360
Width = 8775
Begin VB.TextBox txtname
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1440
TabIndex = 13
Top = 1800
Width = 1812
End
Begin VB.TextBox txtcardno
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1440
TabIndex = 12
Top = 1320
Width = 1812
End
Begin VB.TextBox txtreaderno
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1440
TabIndex = 11
Top = 840
Width = 1812
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 372
Left = 4200
TabIndex = 5
Top = 360
Width = 1812
_ExtentX = 3196
_ExtentY = 656
_Version = 393216
Format = 6750209
CurrentDate = 38828
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 372
Left = 1440
TabIndex = 4
Top = 360
Width = 1812
_ExtentX = 3196
_ExtentY = 656
_Version = 393216
Format = 6750209
CurrentDate = 38828
End
Begin VB.Label Label1
Caption = "人员姓名:"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Index = 4
Left = 360
TabIndex = 10
Top = 1800
Width = 1452
End
Begin VB.Label Label1
Caption = "卡流水号:"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Index = 3
Left = 360
TabIndex = 9
Top = 1320
Width = 1452
End
Begin VB.Label Label1
Caption = "设备号:"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Index = 2
Left = 360
TabIndex = 8
Top = 840
Width = 972
End
Begin VB.Label Label1
Caption = "到:"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Index = 1
Left = 3600
TabIndex = 7
Top = 360
Width = 972
End
Begin VB.Label Label1
Caption = "日期从:"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 360
TabIndex = 6
Top = 360
Width = 975
End
End
Begin MSComctlLib.ListView ListView1
Height = 3492
Left = 360
TabIndex = 2
Top = 3000
Width = 11052
_ExtentX = 19495
_ExtentY = 6160
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 11.4
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 0
End
Begin VB.CommandButton Command4
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 9720
TabIndex = 1
Top = 1200
Width = 1572
End
Begin VB.Label labMoney
Caption = "记录总数:0"
BeginProperty Font
Name = "黑体"
Size = 10.8
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 6720
TabIndex = 0
Top = 6720
Visible = 0 'False
Width = 2772
End
End
Attribute VB_Name = "frmRecordFind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim txtMoney As Currency
Dim rs As New ADODB.Recordset
Dim pssql As String
Dim stDate1 As String
Dim stDate2 As String
Private Sub Command1_Click()
stDate1 = Format(DTPicker1.value, "yyyy-mm-dd") & " 00:00:00"
stDate2 = Format(DTPicker2.value, "yyyy-mm-dd") & " 23:59:59"
If stDate1 > stDate2 Then
MsgBox "开始日期不能大于结束日期!", vbCritical + vbOKOnly, "警告"
Exit Sub
End If
pssql = "select * from linkdatabuffer where CStr(m1date)>='" & stDate1 & "' and cstr(m1date)<='" & stDate2 & "'" ' order by recordid"
If txtreaderno <> "" Then
pssql = pssql & " and readerno='" & txtreaderno & "'"
End If
If txtCardNO <> "" Then
pssql = pssql & " and m1cardno='" & txtCardNO & "'"
End If
If txtName <> "" Then
pssql = pssql & " and m1name='" & txtName & "'"
End If
Call listrecord
End Sub
''Private Sub Command3_Click() '按操作员汇总
''Dim L As ListItem
''Dim i As Integer
''
''stDate1 = Format(DTPicker1.value, "yyyy-mm-dd")
''stDate2 = Format(DTPicker2.value, "yyyy-mm-dd")
''If stDate1 > stDate2 Then
'' MsgBox "开始日期不能大于结束日期!", vbCritical + vbOKOnly, "警告"
'' Exit Sub
''End If
''txtMoney = 0
''ListView1.ColumnHeaders.Clear
''ListView1.ListItems.Clear
''ListView1.View = lvwReport
''
''ListView1.ColumnHeaders.Add , , "操作员", 1800
''ListView1.ColumnHeaders.Add , , "充值金额", 1800
''
''pssql = "select M1_CardID,sum(m1_addmoney) as M1_AddMoney from linkaddmoneybuffer where m1_cdate>='" & stDate1 & "' and m1_cdate<='" & stDate2 & "' group by M1_CardID"
''Set rs = GetRecordset(maSys_db, pssql)
''Do While Not rs.EOF
'' Set L = ListView1.ListItems.Add(, "a" + CStr(i), CStr(rs!M1_CardID))
'' 'L.ForeColor = vbRed
'' L.ListSubItems.Add , , rs!m1_addmoney
'' txtMoney = txtMoney + rs!m1_addmoney
''
'' rs.MoveNext
'' i = i + 1
''Loop
''labMoney = "充值交易总额:" & Format(CStr(txtMoney), "000000.00")
''End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
'Me.Top = (Screen.Height - Me.Height) / 2 + 200
'Me.Left = (Screen.Width - Me.Width) / 2
DTPicker1.value = Format(Now, "yyyy-mm-dd")
DTPicker2.value = Format(Now, "yyyy-mm-dd")
stDate1 = Format(DTPicker1.value, "yyyy-mm-dd")
stDate2 = Format(DTPicker2.value, "yyyy-mm-dd")
pssql = "select * from linkdatabuffer order by recordid" 'where m1_cdate>='" & stDate1 & "' and m1_cdate<='" & stDate2 & "'order by m1_cardid,m1_cdate,m1_ctime"
Call listrecord
End Sub
Private Sub listrecord()
Dim L As ListItem
Dim i As Integer
txtMoney = 0
ListView1.ColumnHeaders.Clear
ListView1.ListItems.Clear
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add , , "记录流水号", 1500
ListView1.ColumnHeaders.Add , , "设备号", 1400
ListView1.ColumnHeaders.Add , , "姓名", 1800
ListView1.ColumnHeaders.Add , , "卡流水号", 1500
ListView1.ColumnHeaders.Add , , "部门编号", 1200
ListView1.ColumnHeaders.Add , , "开门时间", 2700
Set rs = GetRecordset(maSys_db, pssql)
Do While Not rs.EOF
i = rs.Fields("recordid")
Set L = ListView1.ListItems.Add(, "a" + CStr(i), CStr(rs!RecordID))
'L.ForeColor = vbRed
L.ListSubItems.Add , , rs!readerno
'txtMoney = txtMoney + rs!m1_addmoney
L.ListSubItems.Add , , rs!m1name
L.ListSubItems.Add , , rs!m1cardno
L.ListSubItems.Add , , rs!dept_name
L.ListSubItems.Add , , rs!m1date
rs.MoveNext
i = i + 1
Loop
rs.Close
'labMoney = "充值交易总额:" & Format(CStr(txtMoney), "000000.00")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -