📄 frmselect.frm
字号:
VERSION 5.00
Begin VB.Form frmselect
BorderStyle = 3 'Fixed Dialog
Caption = "自动赋词标引—结果查询"
ClientHeight = 6390
ClientLeft = 45
ClientTop = 330
ClientWidth = 7260
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6390
ScaleWidth = 7260
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
Caption = "查询结果:"
Height = 2895
Left = 240
TabIndex = 2
Top = 3240
Width = 6735
Begin VB.ListBox Listjieguo
Height = 2220
Left = 240
TabIndex = 3
Top = 360
Width = 6255
End
End
Begin VB.Frame Frame1
Height = 2175
Left = 240
TabIndex = 1
Top = 840
Width = 6735
Begin VB.CommandButton Command2
Caption = "取消查询"
Height = 375
Left = 5280
TabIndex = 11
Top = 1560
Width = 1095
End
Begin VB.TextBox txtkeyword2
Height = 375
Left = 1800
TabIndex = 10
Top = 960
Width = 4575
End
Begin VB.OptionButton Option2
Caption = "Option2"
Height = 255
Left = 240
TabIndex = 8
Top = 1080
Width = 255
End
Begin VB.OptionButton Option1
Caption = "Option1"
Height = 255
Left = 240
TabIndex = 7
Top = 480
Width = 255
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 375
Left = 3360
TabIndex = 6
Top = 1560
Width = 1095
End
Begin VB.TextBox txtkeyword1
Height = 375
Left = 1800
TabIndex = 5
Top = 360
Width = 4575
End
Begin VB.Label Label3
Caption = "文章标题:"
Height = 375
Left = 600
TabIndex = 9
Top = 1080
Width = 975
End
Begin VB.Label Label1
Caption = "标 引 词:"
Height = 375
Left = 600
TabIndex = 4
Top = 480
Width = 975
End
End
Begin VB.Label Label2
Caption = "自动赋词标引结果查询"
BeginProperty Font
Name = "黑体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 615
Left = 600
TabIndex = 0
Top = 240
Width = 5895
End
End
Attribute VB_Name = "frmselect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim title1 As String
Dim biaoyinci As String
Dim cn As New ADODB.Connection
Set cn = New ADODB.Connection
cn.Provider = "microsoft.jet.oledb.4.0"
cn.open App.Path & "\data.mdb"
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim sql As String
If Option1 = True Then
sql = "select 文章标题,标引词 from 结果 where 标引词 like '%" & Trim(txtkeyword1.Text) & "%'"
Else
If Option2 = True Then
txtkeyword2.SetFocus
sql = "select 文章标题,标引词 from 结果 where 文章标题 like '%" & Trim(txtkeyword2.Text) & "%'"
End If
End If
rs.open sql, cn, 1, 1
While Not rs.EOF
title1 = rs.Fields(0)
biaoyinci = rs.Fields(1)
Listjieguo.AddItem "文章标题:" & title1 & " " & "标引词:" & biaoyinci
rs.MoveNext
Wend
rs.Clone
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Option1 = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -