?? form3.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 Form3
BorderStyle = 1 'Fixed Single
Caption = "學生狀況管理"
ClientHeight = 5190
ClientLeft = 45
ClientTop = 330
ClientWidth = 6585
Icon = "Form3.frx":0000
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5190
ScaleWidth = 6585
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame2
Caption = "查詢條件:"
Height = 1215
Left = 2160
TabIndex = 5
Top = 240
Width = 4095
Begin VB.CommandButton Command2
Caption = "關閉"
Height = 375
Left = 3000
TabIndex = 8
Top = 480
Width = 855
End
Begin VB.CommandButton Command1
Caption = "查詢"
Enabled = 0 'False
Height = 375
Left = 2040
TabIndex = 7
Top = 480
Width = 855
End
Begin VB.TextBox Text1
Height = 375
Left = 240
TabIndex = 6
Top = 480
Width = 1575
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 2640
Top = 600
Width = 2775
_ExtentX = 4895
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = 0
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.Frame Frame1
Caption = "查詢類型:"
Height = 1215
Left = 240
TabIndex = 2
Top = 240
Width = 1815
Begin VB.OptionButton Option1
Caption = " 學號"
Height = 255
Index = 0
Left = 360
TabIndex = 4
Top = 360
Width = 1215
End
Begin VB.OptionButton Option1
Caption = " 姓名"
Height = 255
Index = 1
Left = 360
TabIndex = 3
Top = 720
Width = 1215
End
End
Begin VB.Frame Frame3
Caption = "查詢結果:"
Height = 3375
Left = 240
TabIndex = 0
Top = 1560
Width = 6015
Begin MSDataGridLib.DataGrid DataGrid1
Height = 2775
Left = 240
TabIndex = 1
Top = 360
Width = 5535
_ExtentX = 9763
_ExtentY = 4895
_Version = 393216
Enabled = -1 'True
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
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
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
Dim str As String
If Option1(0).Value = True Then
str = "select * from data where 學號 = " & Val(Text1.Text)
'MsgBox str
SQL = str
Adodc1.RecordSource = SQL
Adodc1.Refresh
'recnum = rs.RecordCount
' If recnum = 0 Then
' MsgBox "數據庫無此記錄", , "系統提示"
' Exit Sub
'End If
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Else
' If Adodc1.Recordset.RecordCount = 0 Then
' MsgBox "數據庫無此記錄", , "系統提示"
' Exit Sub
'End If
str = "select * from data where 姓名 LIKE '" & Text1.Text & "%'"
'MsgBox str
SQL = str
Adodc1.RecordSource = SQL
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\data.MDe;Persist Security Info=False"
Adodc1.CommandType = adCmdText
End Sub
Private Sub Option1_Click(Index As Integer)
Command1.Enabled = True
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -