📄 frmsumi.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmsumi
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "个人信息->查 询"
ClientHeight = 6330
ClientLeft = 45
ClientTop = 435
ClientWidth = 11070
Icon = "frmsumi.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 6330
ScaleWidth = 11070
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
BorderStyle = 0 'None
Enabled = 0 'False
ForeColor = &H80000008&
Height = 855
Left = 1720
ScaleHeight = 855
ScaleWidth = 9255
TabIndex = 5
Top = 0
Width = 9255
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 300
Index = 5
Left = 7580
MaxLength = 10
TabIndex = 11
Top = 480
Width = 1500
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 300
Index = 6
Left = 6060
MaxLength = 10
TabIndex = 10
Top = 480
Width = 1500
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 300
Index = 4
Left = 4550
MaxLength = 10
TabIndex = 9
Top = 480
Width = 1500
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 300
Index = 3
Left = 3030
MaxLength = 10
TabIndex = 8
Top = 480
Width = 1500
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 300
Index = 2
Left = 1510
MaxLength = 10
TabIndex = 7
Top = 480
Width = 1500
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 300
Index = 1
Left = 0
MaxLength = 10
TabIndex = 6
Top = 480
Width = 1500
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "入学日期"
Height = 255
Index = 6
Left = 6060
TabIndex = 18
Top = 240
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "联系电话"
Height = 255
Index = 5
Left = 7580
TabIndex = 17
Top = 240
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "班号"
Height = 255
Index = 4
Left = 4550
TabIndex = 16
Top = 240
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "生日"
Height = 255
Index = 3
Left = 3030
TabIndex = 15
Top = 240
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "性别"
Height = 255
Index = 2
Left = 1510
TabIndex = 14
Top = 240
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "姓名"
Height = 255
Index = 1
Left = 0
TabIndex = 13
Top = 240
Width = 1215
End
End
Begin VB.TextBox Text1
BackColor = &H8000000E&
Height = 300
Index = 0
Left = 240
MaxLength = 10
TabIndex = 2
Top = 480
Width = 1200
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 4800
Left = 240
TabIndex = 0
Top = 1320
Width = 3885
_ExtentX = 6853
_ExtentY = 8467
_Version = 393216
FixedCols = 0
BackColorFixed = 14737632
BackColorBkg = -2147483643
Enabled = 0 'False
Appearance = 0
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid2
Height = 4800
Left = 4440
TabIndex = 1
Top = 1320
Width = 6375
_ExtentX = 11245
_ExtentY = 8467
_Version = 393216
Cols = 3
FixedCols = 0
BackColorFixed = 14737632
BackColorBkg = -2147483643
Enabled = 0 'False
Appearance = 0
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学号"
Height = 255
Index = 0
Left = 240
TabIndex = 12
Top = 240
Width = 1215
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " 奖 惩 表"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Index = 1
Left = 240
TabIndex = 4
Top = 960
Width = 3885
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " 成 绩 表"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Index = 0
Left = 4440
TabIndex = 3
Top = 960
Width = 6375
End
End
Attribute VB_Name = "frmsumi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim MsgText As String
Dim txtSQL As String
Private Sub Form_Load()
With MSFlexGrid1
.Cols = 4
.ColWidth(0) = 0
.ColWidth(1) = 0
.ColWidth(2) = 1700
.ColWidth(3) = 1700
.TextMatrix(0, 2) = "奖惩日期"
.TextMatrix(0, 3) = "奖惩名称"
.Rows = 1
End With
With MSFlexGrid2
.Cols = 6
.ColWidth(0) = 0
.ColWidth(1) = 1550
.ColWidth(2) = 1550
.ColWidth(3) = 0
.ColWidth(4) = 1550
.ColWidth(5) = 1550
.TextMatrix(0, 1) = "考试期号"
.TextMatrix(0, 2) = "学生班号"
.TextMatrix(0, 4) = "考试课程"
.TextMatrix(0, 5) = "考试分数"
.Rows = 1
End With
Picture1.Visible = False
MSFlexGrid1.Visible = False
MSFlexGrid2.Visible = False
End Sub
Private Sub Form_Resize()
dColor.ZOrder 1
End Sub
Private Sub Text1_Change(Index As Integer)
If Index = 0 Then
txtSQL = "select * from student_Form where student_NO='" & Trim(Text1(0)) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = False Then
For i = 1 To 6
Text1(i) = mrc.Fields(i)
Next
Picture1.Visible = True
Else
Picture1.Visible = False
For i = 1 To 6
Text1(i) = ""
Next
End If
mrc.Close
txtSQL = "select * from prize_Stud where prize_Stu='" & Trim(Text1(0)) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = False Then
With MSFlexGrid1
.Rows = 1
Do While Not mrc.EOF
.Rows = .Rows + 1
For i = 0 To mrc.Fields.Count - 1
Select Case mrc.Fields(i).Type
Case adDBDate
.TextMatrix(.Rows - 1, i) = Format(mrc.Fields(i) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i) = mrc.Fields(i) & ""
End Select
Next i
mrc.MoveNext
Loop
End With
mrc.Close
MSFlexGrid1.Visible = True
Else
MSFlexGrid1.Visible = False
With MSFlexGrid1
.Clear
.Cols = 4
.ColWidth(0) = 0
.ColWidth(1) = 0
.ColWidth(2) = 1700
.ColWidth(3) = 1700
.TextMatrix(0, 2) = "奖惩日期"
.TextMatrix(0, 3) = "奖惩名称"
.Rows = 1
End With
End If
txtSQL = "select * from score_Form where score_Stu='" & Trim(Text1(0)) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = False Then
With MSFlexGrid2
.Rows = 1
Do While Not mrc.EOF
.Rows = .Rows + 1
For i = 0 To mrc.Fields.Count - 1
Select Case mrc.Fields(i).Type
Case adDBDate
.TextMatrix(.Rows - 1, i) = Format(mrc.Fields(i) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i) = mrc.Fields(i) & ""
End Select
Next i
mrc.MoveNext
Loop
End With
mrc.Close
MSFlexGrid2.Visible = True
Else
MSFlexGrid2.Visible = False
With MSFlexGrid2
.Clear
.Cols = 6
.ColWidth(0) = 0
.ColWidth(1) = 1550
.ColWidth(2) = 1550
.ColWidth(3) = 0
.ColWidth(4) = 1550
.ColWidth(5) = 1550
.TextMatrix(0, 1) = "考试期号"
.TextMatrix(0, 2) = "学生班号"
.TextMatrix(0, 4) = "考试课程"
.TextMatrix(0, 5) = "考试分数"
.Rows = 1
End With
End If
End If
End Sub
Private Sub ShowData()
Set mrc = ExecuteSQL(txtSQL, MsgText)
With MSFlexGrid1
.Rows = 1
Do While Not mrc.EOF
.Rows = .Rows + 1
For i = 0 To mrc.Fields.Count - 1
Select Case mrc.Fields(i).Type
Case adDBDate
.TextMatrix(.Rows - 1, i) = Format(mrc.Fields(i) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i) = mrc.Fields(i) & ""
End Select
Next i
mrc.MoveNext
Loop
End With
mrc.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -