?? 查詢班級或系部信息.frm
字號:
VERSION 5.00
Begin VB.Form 查詢班級信息
Caption = "Form1"
ClientHeight = 5160
ClientLeft = 60
ClientTop = 345
ClientWidth = 4080
LinkTopic = "Form1"
ScaleHeight = 5160
ScaleWidth = 4080
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text3
Height = 735
Left = 1920
TabIndex = 4
Text = " "
Top = 1800
Width = 1695
End
Begin VB.TextBox Text2
Height = 735
Left = 1920
TabIndex = 3
Text = " "
Top = 960
Width = 1695
End
Begin VB.TextBox Text1
Height = 615
Left = 1920
TabIndex = 2
Text = " "
Top = 240
Width = 1695
End
Begin VB.CommandButton Command2
Caption = " 取消"
Height = 495
Left = 1560
TabIndex = 1
Top = 3360
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "查詢"
Height = 495
Left = 120
TabIndex = 0
Top = 3360
Width = 1095
End
Begin VB.Label Label3
Caption = " 班級編號"
Height = 495
Left = 120
TabIndex = 7
Top = 2040
Width = 1575
End
Begin VB.Label Label2
Caption = " 班級名稱"
Height = 615
Left = 240
TabIndex = 6
Top = 1080
Width = 1455
End
Begin VB.Label Label1
Caption = " 系部編號"
Height = 615
Left = 240
TabIndex = 5
Top = 240
Width = 1335
End
End
Attribute VB_Name = "查詢班級信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs8 As New ADODB.Recordset
Private Sub Command2_Click()
Me.Hide
End Sub
Private Sub Command1_Click()
If rs8.State <> 0 Then rs8.Close
rs8.Open "select* from 班級表", cnn, 3, 1
rs8.Find "系部編號 like '" & Text1 & "'"
If rs8.EOF Then
MsgBox "沒有此記錄!"
Text1 = ""
Exit Sub
Else
Text3 = rs8("班級編號")
Text2 = rs8("班級名稱")
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -