📄 rmbgds.frm
字号:
VERSION 5.00
Begin VB.Form RMLOGIN
Caption = "用户登录报表"
ClientHeight = 2445
ClientLeft = 60
ClientTop = 345
ClientWidth = 5775
LinkTopic = "Form1"
ScaleHeight = 2445
ScaleWidth = 5775
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "查询"
Height = 2175
Left = 100
TabIndex = 0
Top = 120
Width = 5600
Begin VB.TextBox LB52
Height = 270
Left = 2280
TabIndex = 16
Top = 1800
Width = 975
End
Begin VB.TextBox LB51
Height = 270
Left = 960
TabIndex = 14
Top = 1800
Width = 975
End
Begin VB.TextBox LB42
Height = 270
Left = 2280
TabIndex = 12
Top = 1440
Width = 975
End
Begin VB.TextBox LB41
Height = 270
Left = 960
TabIndex = 10
Top = 1440
Width = 975
End
Begin VB.CommandButton BTN_QUT
Caption = "关闭"
Height = 500
Left = 3840
TabIndex = 9
Top = 1440
Width = 1500
End
Begin VB.TextBox LB31
Height = 270
Left = 960
TabIndex = 5
Top = 1080
Width = 975
End
Begin VB.CommandButton BTN_CLR
Caption = "清除"
Height = 500
Left = 3840
TabIndex = 4
Top = 840
Width = 1500
End
Begin VB.TextBox LB21
Height = 270
Left = 960
TabIndex = 3
Top = 720
Width = 975
End
Begin VB.TextBox LB11
Height = 270
Left = 960
TabIndex = 2
Top = 360
Width = 975
End
Begin VB.CommandButton BTN_SEA
Caption = "查询"
Height = 500
Left = 3840
TabIndex = 1
Top = 240
Width = 1500
End
Begin VB.Label Label4
Caption = "°"
Height = 195
Left = 2040
TabIndex = 17
Top = 1845
Width = 315
End
Begin VB.Label Label3
Caption = "登录时间"
Height = 195
Left = 120
TabIndex = 15
Top = 1845
Width = 795
End
Begin VB.Label Label2
Caption = "°"
Height = 195
Left = 2040
TabIndex = 13
Top = 1478
Width = 315
End
Begin VB.Label Label1
Caption = "登录日期"
Height = 195
Left = 120
TabIndex = 11
Top = 1485
Width = 795
End
Begin VB.Label Label9
Caption = "用户ID"
Height = 195
Left = 120
TabIndex = 8
Top = 1125
Width = 795
End
Begin VB.Label Label8
Caption = "收银台号"
Height = 195
Left = 120
TabIndex = 7
Top = 758
Width = 795
End
Begin VB.Label Label7
Caption = "登录编号"
Height = 195
Left = 120
TabIndex = 6
Top = 398
Width = 795
End
End
End
Attribute VB_Name = "RMLOGIN"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public CN As New ADODB.Connection, RS As New ADODB.Recordset
Public SQL As String
Const DBPATH = "./POS.MDB"
Const ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPATH
Private Sub BTN_CLR_Click()
LB11.Text = ""
LB21.Text = ""
LB31.Text = ""
LB41.Text = ""
LB42.Text = ""
LB51.Text = ""
LB52.Text = ""
End Sub
Private Sub BTN_QUT_Click()
Unload RMLOGIN
End Sub
Private Sub BTN_SEA_Click()
DR_LOGIN.Sections("ReportHeader").Controls("LB_TITLE").Caption = RMLOGIN.Caption
S = "SELECT * FROM SYSLOG "
S = S & "WHERE SGENO IS NOT NULL"
If (LB11.Text <> "") Then S = S & " AND SGENO LIKE '%" + LB11.Text + "%' "
If (LB21.Text <> "") Then S = S & " AND PAIDE = '" + LB21.Text + "' "
If (LB31.Text <> "") Then S = S & " AND BNENO = '" + LB31.Text + "' "
If (LB41.Text <> "") And (LB42.Text <> "") Then S = S & " AND ( SGDAT >= #" + LB41.Text + "# AND SGDAT <=#" + LB42.Text + "# ) "
If (LB41.Text <> "") And (LB42.Text = "") Then S = S & " AND SGDAT >= #" + LB41.Text + "# "
If (LB41.Text = "") And (LB42.Text <> "") Then S = S & " AND SGDAT <= #" + LB42.Text + "# "
If (LB51.Text <> "") And (LB52.Text <> "") Then S = S & " AND ( SGTME >= '" + LB51.Text + "' AND SGTME <='" + LB52.Text + "' ) "
If (LB51.Text <> "") And (LB52.Text = "") Then S = S & " AND SGTME >= '" + LB51.Text + "' "
If (LB51.Text = "") And (LB52.Text <> "") Then S = S & " AND SGTME <= '" + LB52.Text + "' "
RS.Open S, ConnString, , , adCmdText
Set DR_LOGIN.DataSource = RS
DR_LOGIN.Sections("DETAIL").Controls("TEXT1").DataField = "SGENO"
DR_LOGIN.Sections("DETAIL").Controls("TEXT2").DataField = "PAIDE"
DR_LOGIN.Sections("DETAIL").Controls("TEXT3").DataField = "BNENO"
DR_LOGIN.Sections("DETAIL").Controls("TEXT4").DataField = "SGDAT"
DR_LOGIN.Sections("DETAIL").Controls("TEXT5").DataField = "SGTME"
DR_LOGIN.Sections("DETAIL").Controls("TEXT6").DataField = "SGMRK"
DR_LOGIN.Show vbModal
RS.Close
End Sub
Private Sub Form_Load()
Load DR_LOGIN
CN.Open ConnString
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload DR_LOGIN
CN.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -