📄 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
'读取学生个人信息
sqlstr = "select*from 学生信息 where 学号='" & ID & "'"
Set personInfo = courseDB.OpenRecordset(sqlstr, dbOpenSnapshot, dbReadOnly)
'读取学生已选课信息,这里只读取了课程名
sqlstr = "SELECT[课程].[课程名称]"
sqlstr = sqlstr & " FORM 课程 INNER JOIN 学号课程 ON [课程].[课程编号]=[学号课程].[课程编号]"
sqlstr = sqlstr & "WHERE[学号课程].[学号]='" & 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -