📄 lqreport.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form Lqreport
BorderStyle = 1 'Fixed Single
Caption = "本次沥青报表"
ClientHeight = 9240
ClientLeft = 45
ClientTop = 330
ClientWidth = 6990
Icon = "Lqreport.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 9240
ScaleWidth = 6990
StartUpPosition = 2 '屏幕中心
Begin MSDBGrid.DBGrid Lqrptgrid
Bindings = "Lqreport.frx":0442
Height = 8415
Left = 0
OleObjectBlob = "Lqreport.frx":0457
TabIndex = 2
Top = 20
Width = 6975
End
Begin VB.CommandButton CmdLqback
BackColor = &H00C0E0FF&
Caption = "返 回(&R)"
Height = 375
Left = 3600
Style = 1 'Graphical
TabIndex = 1
Top = 8800
Width = 1935
End
Begin VB.CommandButton CmdLqlj
BackColor = &H00C0E0FF&
Caption = "查询报表(&Q)"
Height = 375
Left = 1320
Style = 1 'Graphical
TabIndex = 0
Top = 8800
Width = 1935
End
Begin VB.Data Lqdata
Appearance = 0 'Flat
BackColor = &H00F4FFF5&
Caption = " * 本 次 沥 青 监 控 报 表 *"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
ForeColor = &H00FF0000&
Height = 315
Left = 0
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 8440
Width = 6975
End
End
Attribute VB_Name = "Lqreport"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdLqback_Click()
djgc.lbldqzt.Caption = "等待命令"
Unload Me
djgc.CmdLB.Enabled = True
End Sub
Private Sub CmdLqlj_Click()
tbl = 0
glstr1 = InputBox("请输入起始时间(yyyy-mm-dd)", "起始时间")
If Trim(glstr1) = "" Then
tbl = 0
Lqcxconcent = ""
MsgBox "请输入起始时间!", vbCritical + vbOKOnly, "警告"
Exit Sub
Else
If Trim(glstr1) = Format(glstr1, "yyyy-mm-dd") Then
glstr2 = InputBox("请输入起始时间(yyyy-mm-dd)", "起始时间")
If Trim(glstr2) = "" Then
Lqcxconcent = " where [日期] ='" + Trim(glstr1) + "'"
tbl = 5
Lqrptfrm.Show
Exit Sub
Else
If Trim(glstr2) = Format(glstr2, "yyyy-mm-dd") Then
tbl = 7
Lqcxconcent = " where [日期] >='" + Trim(glstr1) + "' and [日期]<='" + Trim(glstr2) + "'"
Lqrptfrm.Show
Exit Sub
Else
tbl = 0
Lqcxconcent = ""
MsgBox "请输入正确的终止时间格式!!", vbCritical + vbOKOnly, "警告"
Exit Sub
End If
End If
ElseIf Trim(glstr1) = Format(glstr1, "yyyy-mm") Then
Lqcxconcent = " where [日期] between '" + Trim(glstr1) + "' & '-01'and '" + Trim(glstr1) + "' & '-31'"
tbl = 6
Lqrptfrm.Show
Exit Sub
ElseIf IsNumeric(Trim(glstr1)) And Len(Trim(glstr1)) = 4 Then
Lqcxconcent = " where [日期] between '" + Trim(glstr1) + "' & '-01-01'and '" + Trim(glstr1) + "' & '-12-31'"
tbl = 8
Lqrptfrm.Show
Exit Sub
Else
MsgBox "请输入正确的起始时间格式!", vbCritical + vbOKOnly, "警告"
Exit Sub
End If
End If
End Sub
Private Sub Form_Load()
Lqdata.DatabaseName = App.Path & "\report\report.mdb"
Lqdata.RecordsetType = 1
'Gldata.RecordSource = "select * from glthis order by 时间 asc"
Lqdata.RecordSource = "select * from lqthis order by 时间 asc"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -