?? frmsearchinfo.frm
字號(hào):
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 frmsearchInfo
BackColor = &H00C0C0C0&
Caption = "Form1"
ClientHeight = 7410
ClientLeft = 9195
ClientTop = 1965
ClientWidth = 10080
LinkTopic = "Form1"
ScaleHeight = 7410
ScaleWidth = 10080
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 8160
Top = 120
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_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 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=cj.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=cj.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 學(xué)生表 where 學(xué)號(hào)='"" & trim(text1.text) & ""'"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "退出(&E)"
Height = 495
Left = 8400
TabIndex = 10
Top = 1440
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "查詢(&S)"
Height = 495
Left = 8400
TabIndex = 9
Top = 600
Width = 1215
End
Begin VB.Frame Frame2
BackColor = &H00C0C0C0&
Caption = "學(xué)生基本信息"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4575
Left = 240
TabIndex = 7
Top = 2520
Width = 9735
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frmsearchInfo.frx":0000
Height = 4215
Left = 240
TabIndex = 8
Top = 240
Width = 9255
_ExtentX = 16325
_ExtentY = 7435
_Version = 393216
BackColor = 16777215
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "學(xué)生信息表"
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
End
Begin VB.Frame Frame1
BackColor = &H00C0C0C0&
Caption = "查詢依據(jù)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2175
Left = 240
TabIndex = 0
Top = 120
Width = 7695
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
Height = 270
Left = 3120
TabIndex = 5
Top = 1305
Width = 2775
End
Begin VB.OptionButton Option4
BackColor = &H00C0C0C0&
Caption = "院系"
Height = 255
Left = 240
TabIndex = 4
Top = 1800
Width = 855
End
Begin VB.OptionButton Option3
BackColor = &H00C0C0C0&
Caption = "專業(yè)"
Height = 255
Left = 240
TabIndex = 3
Top = 1320
Width = 855
End
Begin VB.OptionButton Option2
BackColor = &H00C0C0C0&
Caption = "班級(jí)"
Height = 255
Left = 240
TabIndex = 2
Top = 840
Width = 855
End
Begin VB.OptionButton Option1
BackColor = &H00C0C0C0&
Caption = "學(xué)號(hào)"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 855
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "請(qǐng)輸入查詢依據(jù)"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3840
TabIndex = 6
Top = 840
Width = 1935
End
End
End
Attribute VB_Name = "frmsearchInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo searcherror
If Text1.Text <> "" Then
If Option1.Value Then searchSQL = " select * from 學(xué)生表 where 學(xué)號(hào)='" & Trim(Text1.Text) & "'"
If Option2.Value Then searchSQL = "select 學(xué)號(hào),姓名,性別,班級(jí) from 學(xué)生表 where 班級(jí)='" & Trim(Text1.Text) & "'"
If Option3.Value Then searchSQL = " select 學(xué)號(hào),姓名,性別,班級(jí),專業(yè) from 學(xué)生表 where 專業(yè)='" & Trim(Text1.Text) & "'"
If Option4.Value Then searchSQL = "select 學(xué)號(hào),姓名,性別,班級(jí),院系,專業(yè) from 學(xué)生表 where 院系='" & Trim(Text1.Text) & "'"
Else
MsgBox "查詢條件不能為空,請(qǐng)輸入查詢條件!"
Text1.SetFocus
End If
Adodc1.RecordSource = searchSQL
Adodc1.Refresh
If Option1.Value Then
If Adodc1.Recordset.EOF Then
MsgBox "沒有這個(gè)學(xué)生!"
End If
End If
If Option2.Value Then
If Adodc1.Recordset.EOF Then
MsgBox "沒有這個(gè)班級(jí)!"
End If
End If
If Option3.Value Then
If Adodc1.Recordset.EOF Then
MsgBox "沒有這個(gè)專業(yè)!"
End If
End If
If Option4.Value Then
If Adodc1.Recordset.EOF Then
MsgBox "沒有這個(gè)院系!"
End If
End If
Exit Sub
searcherror:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.Close
Unload Me
End Sub
Private Sub Form_Load()
MakeCenter frmsearchInfo
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -