📄 formclass3.frm
字号:
VERSION 5.00
Begin VB.Form Formclass3
BorderStyle = 1 'Fixed Single
Caption = "班级查询"
ClientHeight = 4635
ClientLeft = 6615
ClientTop = 6360
ClientWidth = 5610
Icon = "Formclass3.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4635
ScaleWidth = 5610
Begin VB.TextBox Text1
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 405
Index = 0
Left = 2160
TabIndex = 3
Top = 960
Width = 2295
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 2400
TabIndex = 2
Top = 3600
Width = 1575
End
Begin VB.TextBox Text1
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 390
Index = 1
Left = 2160
TabIndex = 1
Top = 1800
Width = 2295
End
Begin VB.TextBox Text1
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 420
Index = 2
Left = 2160
TabIndex = 0
Top = 2610
Width = 2295
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "要输入起码一个条件以上才能查询"
Height = 615
Left = 120
TabIndex = 8
Top = 3840
Width = 1695
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "专业:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 720
TabIndex = 7
Top = 2760
Width = 1575
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "班级:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 720
TabIndex = 6
Top = 1800
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "年级:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 720
TabIndex = 5
Top = 1080
Width = 975
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "班级设置查询"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 1680
TabIndex = 4
Top = 0
Width = 2175
End
End
Attribute VB_Name = "Formclass3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
txtsql = ""
If Text1(0).Text <> "" Then
If txtsql = "" Then
txtsql = "年级='" & Trim(Text1(0).Text) & "'"
Else
txtsql = txtsql & "and 年级='" & Trim(Text1(0).Text) & "'"
End If
End If
If Text1(1).Text <> "" Then
If txtsql = "" Then
txtsql = "班级='" & Trim(Text1(1).Text) & "'"
Else
txtsql = txtsql & "and 班级='" & Trim(Text1(1).Text) & "'"
End If
End If
If Text1(2).Text <> "" Then
aa = 1
If txtsql = "" Then
txtsql = "专业='" & Trim(Text1(2).Text) & "'"
Else
txtsql = txtsql & "and 专业='" & Trim(Text1(2).Text) & "'"
End If
End If
If txtsql = "" Then
ss = MsgBox("你至少要输入一个条件以上才能查询!", , " 警告")
Text1(0).SetFocus
Exit Sub
End If
txtsql = "select * from class where " & txtsql
Dim mrc As ADODB.Recordset
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
zzz = MsgBox("对不起,没有此班级的档案记录!", vbOKOnly, "查询")
Formclass3.ZOrder (0)
Formclass3.Text1(0).SetFocus
Exit Sub
End If
Formclass2.printstr = txtsql
classfind = True
Formclass2.Show
Formclass2.classshowtitle
Formclass2.classshowdata
Formclass2.Caption = "班级设置查询结果"
Formclass2.ZOrder (0)
End Sub
Private Sub Form_Unload(Cancel As Integer)
classfind = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -