- VERSION 5.00
- Begin VB.Form Formclass3
- BorderStyle = 1 'Fixed Single
- Caption = "班级查询"
- ClientHeight = 2895
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3990
- Icon = "Formclass3.frx":0000
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 2895
- ScaleWidth = 3990
- Begin VB.TextBox Text1
- BackColor = &H80000018&
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Index = 0
- Left = 1560
- TabIndex = 3
- Top = 960
- Width = 975
- End
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 255
- Left = 1440
- TabIndex = 2
- Top = 2520
- Width = 1095
- End
- Begin VB.TextBox Text1
- BackColor = &H80000018&
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 1
- Left = 1560
- TabIndex = 1
- Top = 1440
- Width = 1215
- End
- Begin VB.TextBox Text1
- BackColor = &H80000018&
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 2
- Left = 1560
- TabIndex = 0
- Top = 1920
- Width = 1695
- End
- Begin VB.Label Label4
- Caption = "专业:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 255
- Left = 840
- TabIndex = 7
- Top = 1920
- Width = 1575
- End
- Begin VB.Label Label2
- Caption = "班级:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 255
- Left = 840
- TabIndex = 6
- Top = 1440
- Width = 1455
- End
- Begin VB.Label Label1
- Caption = "年级:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 255
- Left = 840
- TabIndex = 5
- Top = 960
- Width = 975
- End
- Begin VB.Label Label3
- Caption = "班级设置查询"
- BeginProperty Font
- Name = "华文中宋"
- Size = 15.75
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 840
- TabIndex = 4
- Top = 120
- 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