📄 form20.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form20
BorderStyle = 0 'None
Caption = "Form20"
ClientHeight = 8010
ClientLeft = 0
ClientTop = 0
ClientWidth = 12165
Icon = "Form20.frx":0000
LinkTopic = "Form20"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Form20.frx":1782
ScaleHeight = 8010
ScaleWidth = 12165
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.ComboBox Combo2
Appearance = 0 'Flat
Height = 300
ItemData = "Form20.frx":43D7
Left = 4080
List = "Form20.frx":43D9
TabIndex = 4
Text = "Like"
Top = 240
Width = 1935
End
Begin VB.CommandButton Command2
Appearance = 0 'Flat
Caption = "取消"
Height = 300
Left = 11040
Picture = "Form20.frx":43DB
Style = 1 'Graphical
TabIndex = 3
Top = 240
Width = 735
End
Begin VB.CommandButton Command1
Appearance = 0 'Flat
Caption = "查询"
Height = 300
Left = 9720
Picture = "Form20.frx":557F
Style = 1 'Graphical
TabIndex = 2
Top = 240
Width = 735
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 300
Left = 6960
TabIndex = 1
Top = 240
Width = 2055
End
Begin VB.ComboBox Combo1
Appearance = 0 'Flat
Height = 300
Left = 960
TabIndex = 0
Top = 240
Width = 2175
End
Begin MSComctlLib.ListView ListView1
Height = 6735
Left = 0
TabIndex = 8
Top = 840
Width = 12135
_ExtentX = 21405
_ExtentY = 11880
View = 3
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
HotTracking = -1 'True
_Version = 393217
ForeColor = 16711680
BackColor = 16777215
BorderStyle = 1
Appearance = 0
NumItems = 3
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "单位名称"
Object.Width = 8292
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Alignment = 2
SubItemIndex = 1
Text = "工程编号"
Object.Width = 8819
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Alignment = 2
SubItemIndex = 2
Text = "时间"
Object.Width = 4189
EndProperty
Picture = "Form20.frx":6723
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "蓝色代表审核正常流转"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 5520
TabIndex = 11
Top = 7680
Width = 2175
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "红色代表没有结算"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 2280
TabIndex = 10
Top = 7680
Width = 1815
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "黑色代表退稿"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 9000
TabIndex = 9
Top = 7680
Width = 1695
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "内容:"
ForeColor = &H00FF0000&
Height = 375
Left = 6360
TabIndex = 7
Top = 360
Width = 975
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "条件:"
ForeColor = &H00FF0000&
Height = 375
Left = 3480
TabIndex = 6
Top = 360
Width = 975
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "项目:"
ForeColor = &H00FF0000&
Height = 255
Left = 360
TabIndex = 5
Top = 360
Width = 855
End
End
Attribute VB_Name = "Form20"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i, j As Integer
Dim sqlstring As String
Static l As Integer
If Combo1 = "" Or Combo2 = "" Or Text1 = "" Then
MsgBox "表达式不正确", vbInformation, "提示框!"
Exit Sub
End If
sqlstring = "SELECT * FROM " & biaoming & " WHERE " & Combo1 & " " & Combo2 & " '%" & Text1 & "%'"
grs.Open sqlstring, gconn
l = 0
For i = 1 To grs.RecordCount
l = l + 1
Form21.ListView1.ListItems.Add i, , grs.Fields(0).Value
For j = 1 To 2
Form21.ListView1.ListItems.Item(i).SubItems(j) = grs.Fields(j).Value
Next
Form21.ListView1.ListItems.Item(i).SubItems(3) = grs.Fields(120).Value
If grs("结算员").Value = "0" Then
Form21.ListView1.ListItems.Item(i).ForeColor = vbRed '红色
Form21.ListView1.ListItems.Item(i).ListSubItems.Item(1).ForeColor = vbRed
Form21.ListView1.ListItems.Item(i).ListSubItems.Item(2).ForeColor = vbRed
Form21.ListView1.ListItems.Item(i).ListSubItems.Item(3).ForeColor = vbRed
End If
If grs("depart").Value = "11" Then
Form21.ListView1.ListItems.Item(i).ForeColor = &H0& '黑色
Form21.ListView1.ListItems.Item(i).ListSubItems.Item(1).ForeColor = &H0&
Form21.ListView1.ListItems.Item(i).ListSubItems.Item(2).ForeColor = &H0&
Form21.ListView1.ListItems.Item(i).ListSubItems.Item(3).ForeColor = &H0&
End If
grs.MoveNext
Next
grs.Close
If l <> 0 Then
Form21.Label2.Caption = " 共有" & l & "记录满足查询条件"
Form21.Show vbModal
Else
MsgBox "没有查询的内容", vbInformation, "提示框!"
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
With Me
.Height = 8010
.left = 2332
.top = 2600
.Width = 12160
End With
With Combo2
.AddItem ("Like")
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -