Case 1 '学号
wherestr = wherestr + "StudentID='" & txtKey & "'" Case 2 '姓名
wherestr = wherestr + "StudentName='" & txtKey & "'" Case 3 '班级
wherestr = wherestr + "Class='" & txtKey & "'" Case 4 '备注
wherestr = wherestr + "Gender='" & txtKey & "'" Case 5 '关键字
wherestr = wherestr + "(studentid like '%" & txtKey & "%' or studentname like '%" & txtKey & "%' or class like '%" & txtKey & "%' )" End Select End If
'学号关键字
If frameStudentID.Visible And chkIDKey.Value = 1 And txtIDKey.Text <> "" Then If wherestr <> "" Then
If optnIDand.Value Then
wherestr = wherestr + " and " Else
wherestr = wherestr + " or " End If End If
wherestr = wherestr + "StudentID like '%" & txtIDKey & "%'" End If
'姓名关键字
If frameStudentName.Visible And chkNameKey.Value = 1 And txtNameKey.Text <> "" Then If wherestr <> "" Then
If optnNameand.Value Then
wherestr = wherestr + " and " Else
wherestr = wherestr + " or " End If End If
wherestr = wherestr + "StudentName like '%" & txtNameKey & "%'" End If
'班级关键字
If frameClass.Visible And chkClassKey.Value = 1 And txtClassKey.Text <> "" Then If wherestr <> "" Then
If optnClassand.Value Then