【VB开源代码栏目提醒】:网学会员VB开源代码为您提供doc_query.frm参考,解决您在doc_query.frm学习中工作中的难题,参考学习。
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form5
Caption = "档案检索"
ClientHeight = 6855
ClientLeft = 60
ClientTop = 345
ClientWidth = 8715
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form5"
ScaleHeight = 6855
ScaleWidth = 8715
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 495
Left = 4440
TabIndex = 8
Top = 2160
Width = 1455
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 5880
Top = 120
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 3735
Left = 240
TabIndex = 6
Top = 2880
Width = 8175
_ExtentX = 14420
_ExtentY = 6588
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.ComboBox Combo2
Height = 330
Left = 2640
Style = 2 'Dropdown List
TabIndex = 5
Top = 1560
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "检索"
Height = 495
Left = 1800
TabIndex = 4
Top = 2160
Width = 1455
End
Begin VB.TextBox Text1
Height = 375
Left = 2640
TabIndex = 2
Top = 960
Width = 3135
End
Begin VB.ComboBox Combo1
Height = 330
ItemData = "doc_query.frx":0000
Left = 2640
List = "doc_query.frx":0013
Style = 2 'Dropdown List
TabIndex = 1
Top = 240
Width = 2175
End
Begin VB.Label Label3
Caption = "请选择所属类别:"
Height = 375
Left = 600
TabIndex = 7
Top = 1560
Width = 1695
End
Begin VB.Label Label2
Caption = "请输入档案标题:"
Height = 375
Left = 600
TabIndex = 3
Top = 960
Width = 1695
End
Begin VB.Label Label1
Caption = "请选择检索途径:"
Height = 375
Left = 600
TabIndex = 0
Top = 240
Width = 1815
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Select Case Combo1.ListIndex
Case 0
Label2.Visible = True
Text1.Visible = True
Combo2.Visible = False
Label3.Visible = False
Text1.SetFocus
Case 1
Label3.Visible = True
Combo2.Visible = True
Label2.Visible = False
Text1.Visible = False
Case 2
Label2.Caption = "请输入发布单位"
Text1.Visible = True
Combo2.Visible = False
Label3.Visible = False
Text1.SetFocus
Case 3
Label2.Caption = "请输入存放位置"
Text1.Visible = True
Combo2.Visible = False
Label3.Visible = False
Text1.SetFocus
Case 4
Label2.Visible = False
Text1.Visible = False
Combo2.Visible = False
Label3.Visible = False
Case Else
MsgBox "请选择检索途径"
End Select
End Sub
Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String
Dim str As String
Dim str_combo As String
str = Trim(Text1.Text)
str_combo = Combo2.Text
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\file.mdb;Persist Security Info=False"
Select Case Combo1.ListIndex
Case 0
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select dname as 标题,dtname as 所属类别,ddept as 发布单位,daddr as 存放位置,dmemo as 说明 from docinfo where dname='" & str & "'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Case 1
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select dname as 标题,dtname as 所属类别,ddept as 发布单位,daddr as 存放位置,dmemo as 说明 from docinfo where dtname='" & str_combo & "'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Case 2
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select dname as 标题,dtname as 所属类别,ddept as 发布单位,daddr as 存放位置,dmemo as 说明 from docinfo where ddept='" & str & "'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Ref
上一篇:
doc_lend.frm
下一篇:
试题库管理系统毕业论文