📄 goodstudent.frm
字号:
Caption = "学年:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 120
TabIndex = 7
Top = 3480
Width = 2535
End
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 120
Top = 1125
Width = 1935
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
Height = 15
Left = 120
Top = 1080
Width = 2055
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "三好学生评定"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Index = 1
Left = 165
TabIndex = 5
Top = 765
Width = 2175
End
Begin VB.Image Image1
Height = 600
Left = 120
Picture = "goodstudent.frx":3A36E
Stretch = -1 'True
Top = 120
Width = 600
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "您现在正在处理的班级:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 120
TabIndex = 4
Top = 2040
Width = 2535
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label1"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 735
Left = 360
TabIndex = 3
Top = 2280
Width = 2295
End
Begin VB.Label Label9
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Label1"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 735
Left = 360
TabIndex = 2
Top = 3000
Width = 2295
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "此班级所含的学生数目:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 120
TabIndex = 1
Top = 2760
Width = 2535
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "三好学生评定"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 0
Left = 135
TabIndex = 6
Top = 735
Width = 2535
End
End
End
Attribute VB_Name = "goodstudent"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public temp As New ADODB.Recordset
Public nn As String
Public kk As Integer
Public yy As Integer
Private Sub Command2_Click()
Dim aaa As Integer
On Error GoTo 1
aaa = Text1.Text
aaa = Text2.Text
aaa = Text3.Text
aaa = Text4.Text
aaa = Text5.Text
aaa = Text6.Text
aaa = Text7.Text
aaa = Text8.Text
aaa = Text9.Text
aaa = Text10.Text
If Option1.Value = True Then
k = Int(Label9.Caption * Text1.Text / 100)
If k = 0 Then k = 1
a1$ = "select top " & k & " [ID] from [temp] order by [whk]+[x1] desc"
Else
a1$ = "select [ID] from [temp] where [whk]+[x1]>" & Text2.Text & " order by [whk]+[x1] desc"
End If
If Option4.Value = True Then
k = Int(Label9.Caption * Text4.Text / 100)
If k = 0 Then k = 1
a2$ = "select top " & k & " [ID] from [temp] order by [x2] desc"
Else
a2$ = "select [ID] from [temp] where [x2]>" & Text4.Text & " order by [x2] desc"
End If
If Option5.Value = True Then
k = Int(Label9.Caption * Text5.Text / 100)
If k = 0 Then k = 1
a3$ = "select top " & k & " [ID] from [temp] order by [x3] desc"
Else
a3$ = "select [ID] from [temp] where [x3]>" & Text6.Text & " order by [x3] desc"
End If
If Option8.Value = True Then
k = Int(Label9.Caption * Text8.Text / 100)
If k = 0 Then k = 1
a4$ = "select top " & k & " [ID] from [temp] order by [x4] desc"
Else
a4$ = "select [ID] from [temp] where [x4]>" & Text7.Text & " order by [x4] desc"
End If
If Option9.Value = True Then
k = Int(Label9.Caption * Text9.Text / 100)
If k = 0 Then k = 1
a5$ = "select top " & k & " [ID] from [temp] order by [zf] desc"
Else
a5$ = "select [ID] from [temp] where [zf]>" & Text7.Text & " order by [zf] desc"
End If
aa$ = "select * from [temp] where [ID] in ( " & a1$ & ") and [ID] in (" & a2$ & ") and [ID] in (" & a3$ & ") and [ID] in (" & a4$ & ") and [ID] in (" & a5$ & ") order by [zf] desc"
MsgBox aa$
Dim temp As New bp1print_msg
temp.yy = yy
temp.jj = kk
temp.Show 1
Unload Me
Dim ffs As New goodstudent_show
ffs.nn = nn
ffs.kk = kk
ffs.yy = yy
ffs.sql = aa$
ffs.Show 1
Exit Sub
1
MsgBox "数据输入不合法", vbInformation Or vbOKOnly, "提示"
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label3.Caption = nn
Label17.Caption = yy & "--" & yy + 1 & "学年"
temp.Open "select * from [student],[class] where [class].[yid]=" & kk & " and [student].[clasid]=[class].[ID]", main.connect, 3, 2
Label9.Caption = temp.RecordCount
temp.Close
temp.Open "select * from [nn]", main.connect, 3, 2
Label1.Caption = temp.Fields(1) & "(含文化课)"
temp.MoveNext
Label2.Caption = temp.Fields(1)
temp.MoveNext
Label6.Caption = temp.Fields(1)
temp.MoveNext
Label7.Caption = temp.Fields(1)
temp.Close
End Sub
Private Sub Option1_Click()
UpDown1.Enabled = True
UpDown2.Enabled = False
Text1.Enabled = True
Text2.Enabled = False
End Sub
Private Sub Option10_Click()
UpDown10.Enabled = True
UpDown9.Enabled = False
Text10.Enabled = True
Text9.Enabled = False
End Sub
Private Sub Option2_Click()
UpDown1.Enabled = False
UpDown2.Enabled = True
Text1.Enabled = False
Text2.Enabled = True
End Sub
Private Sub Option3_Click()
UpDown4.Enabled = True
UpDown3.Enabled = False
Text3.Enabled = True
Text4.Enabled = False
End Sub
Private Sub Option4_Click()
UpDown3.Enabled = True
UpDown4.Enabled = False
Text4.Enabled = True
Text3.Enabled = False
End Sub
Private Sub Option5_Click()
UpDown5.Enabled = True
UpDown6.Enabled = False
Text5.Enabled = True
Text6.Enabled = False
End Sub
Private Sub Option6_Click()
UpDown6.Enabled = True
UpDown5.Enabled = False
Text6.Enabled = True
Text5.Enabled = False
End Sub
Private Sub Option7_Click()
UpDown8.Enabled = True
UpDown7.Enabled = False
Text7.Enabled = True
Text8.Enabled = False
End Sub
Private Sub Option8_Click()
UpDown7.Enabled = True
UpDown8.Enabled = False
Text8.Enabled = True
Text7.Enabled = False
End Sub
Private Sub Option9_Click()
UpDown9.Enabled = True
UpDown10.Enabled = False
Text9.Enabled = True
Text10.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -