?? infofrm.frm
字號:
VERSION 5.00
Begin VB.Form Infofrm
Caption = "個人信息確認"
ClientHeight = 3750
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3750
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 2295
Left = 120
TabIndex = 2
Top = 720
Width = 4335
Begin VB.Label Label2
Caption = "Label2"
Height = 375
Index = 6
Left = 2520
TabIndex = 11
Top = 960
Width = 855
End
Begin VB.Label Label2
Caption = "Label2"
Height = 375
Index = 5
Left = 2520
TabIndex = 10
Top = 600
Width = 975
End
Begin VB.Label Label2
Caption = "Label2"
Height = 375
Index = 4
Left = 2520
TabIndex = 9
Top = 240
Width = 855
End
Begin VB.Label Label2
Caption = "Label2"
Height = 375
Index = 3
Left = 240
TabIndex = 8
Top = 1680
Width = 615
End
Begin VB.Label Label4
Caption = "Label2"
Height = 375
Left = 240
TabIndex = 7
Top = 1320
Width = 615
End
Begin VB.Label Label2
Caption = "Label2"
Height = 375
Index = 2
Left = 240
TabIndex = 6
Top = 960
Width = 615
End
Begin VB.Label Label2
Caption = "Label2"
Height = 255
Index = 1
Left = 240
TabIndex = 5
Top = 600
Width = 615
End
Begin VB.Label Label2
Caption = "Label2"
Height = 255
Index = 0
Left = 240
TabIndex = 4
Top = 240
Width = 735
End
End
Begin VB.CommandButton Command2
Caption = "錯誤"
Height = 255
Left = 2400
TabIndex = 1
Top = 3240
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "正確"
Height = 255
Left = 240
TabIndex = 0
Top = 3240
Width = 1695
End
Begin VB.Label Label1
Caption = " 請核實你的個人信息"
Height = 495
Left = 360
TabIndex = 3
Top = 240
Width = 3855
End
End
Attribute VB_Name = "Infofrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' 顯示用戶信息
Sub showinfo(ID As String)
Dim personInfo, courseinfo As Recordse '以記錄
Dim sqlstr, str As String
'讀取學(xué)生個人信息
sqlstr = "select*from 學(xué)生信息 where 學(xué)號='" & ID & "'"
Set personInfo = courseDB.OpenRecordset(sqlstr, dbOpenSnapshot, dbReadOnly)
'讀取學(xué)生已選課信息,這里只讀取了課程名
sqlstr = "SELECT[課程].[課程名稱]"
sqlstr = sqlstr & " FORM 課程 INNER JOIN 學(xué)號課程 ON [課程].[課程編號]=[學(xué)號課程].[課程編號]"
sqlstr = sqlstr & "WHERE[學(xué)號課程].[學(xué)號]='" & ID & "'"
Set courseinfo = courseDB.OpenRecordset(sqlstr, dbOpenSnapshot, dbReeadOnly)
For i = 0 To personInfo.Fields.Count - 1
infolab(i).Caption = personInfo.Fields(i).Name & ":" & personInfo.Fields(i).Value
Next
While Not (courseinfo.EOF)
str = str & " " & courseinfo.Fields("課程名稱").Value
courseinfo.MoveNext
Wend
userName = CStr(personInfo.Fields("姓名").Value)
infolab(7).Caption = "選修課程:" & str
personInfo.Close
courseinfo.Close
End Sub
Private Sub Command1_Click()
Infofrm.Hide
End Sub
Private Sub Command2_Click()
MsgBox
Infofrm.Hide
End Sub
Private Sub Form_Activate()
Call showinfo(ID)
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -