📄 resultqueryform.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form resultQueryForm
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 7980
ClientLeft = 45
ClientTop = 330
ClientWidth = 8925
LinkTopic = "成绩查询窗口"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 7980
ScaleWidth = 8925
Begin VB.Frame Frame2
Caption = "结果浏览窗口"
Height = 5895
Left = 120
TabIndex = 1
Top = 1920
Width = 8655
Begin MSFlexGridLib.MSFlexGrid MSF
Height = 5535
Left = 120
TabIndex = 10
Top = 240
Width = 8415
_ExtentX = 14843
_ExtentY = 9763
_Version = 393216
End
End
Begin VB.Frame Frame1
Caption = "查询条件框"
Height = 1695
Left = 120
TabIndex = 0
Top = 120
Width = 8655
Begin VB.CommandButton queryBnt
Caption = "查询"
Height = 375
Left = 2880
TabIndex = 11
Top = 960
Width = 1695
End
Begin VB.ComboBox Combo2
Height = 300
Left = 840
TabIndex = 9
Text = "Combo2"
Top = 960
Width = 1335
End
Begin VB.ComboBox Combo1
Height = 300
Left = 6120
TabIndex = 7
Text = "Combo1"
Top = 240
Width = 1575
End
Begin VB.TextBox Text2
Height = 375
Left = 3480
TabIndex = 5
Text = "Text2"
Top = 240
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Left = 840
TabIndex = 3
Text = "Text1"
Top = 240
Width = 1335
End
Begin VB.Label Label4
Caption = "项目:"
Height = 255
Left = 240
TabIndex = 8
Top = 1080
Width = 615
End
Begin VB.Label Label3
Caption = "班级:"
Height = 255
Left = 5520
TabIndex = 6
Top = 360
Width = 855
End
Begin VB.Label Label2
Caption = "姓名:"
Height = 255
Left = 2880
TabIndex = 4
Top = 360
Width = 855
End
Begin VB.Label Label1
Caption = "学号:"
Height = 255
Left = 240
TabIndex = 2
Top = 360
Width = 855
End
End
End
Attribute VB_Name = "resultQueryForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub classshowtitle()
Dim i As Integer
MSF.Clear
With MSF
.Cols = 10
.TextMatrix(0, 1) = "序号"
.TextMatrix(0, 2) = "学号"
.TextMatrix(0, 3) = "姓名"
.TextMatrix(0, 4) = "性别"
.TextMatrix(0, 5) = "班级"
.TextMatrix(0, 6) = "项目"
.TextMatrix(0, 7) = "名次"
.TextMatrix(0, 8) = "成绩"
.TextMatrix(0, 9) = "积分"
.ColWidth(0) = 100
.ColWidth(1) = 1300
.ColWidth(2) = 1200
.ColWidth(3) = 1200
.ColWidth(4) = 1500
.ColWidth(5) = 1500
.ColWidth(6) = 1500
.ColWidth(7) = 1500
.ColWidth(8) = 1500
.FixedRows = 1
For i = 1 To 9
.ColAlignment(i) = 0
Next i
.FillStyle = flexFillSingle
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.Row = 1
End With
End Sub
Public Sub classshowdata()
Dim j As Integer
Dim i As Integer
Dim mrc1 As ADODB.Recordset
strSql = "select student_sport_id,student_info_no,student_info_name,student_info_sex,class_info_name,sport_item_name,student_sport_rank,student_sport_result,student_sport_no from student_sport,student_info,class_info,sport_item where student_info.student_info_id = student_sport.student_info_id and class_info.class_info_id = student_info.class_info_id and student_sport.sport_item_id = sport_item.sport_item_id"
Set mrc1 = ExecuteSQL(Trim(strSql))
If mrc1.EOF = False Then
mrc1.MoveFirst
With MSF
.Rows = 1
Do While Not mrc1.EOF
.Rows = .Rows + 1
For i = 1 To mrc1.Fields.Count
If mrc1.Fields(i - 1) = Null Then
.TextMatrix(.Rows - 1, i) = ""
Else
.TextMatrix(.Rows - 1, i) = mrc1.Fields(i - 1)
End If
Next i
mrc1.MoveNext
Loop
mrc1.Close
End With
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -