End Sub
4.2 系统员管理界面设计
如图4-2。
图4-2 系统员管理界面
关键编码:
Private Sub cmdFStudent_Click() '查找学生
Dim sqlstr As String Dim wherestr As String '判断有无Where语句 Dim bwhere As Boolean
sqlstr = "select * from studenttable" wherestr = "" bwhere = False
If txtStudentName.Text <> "" Then
wherestr = wherestr + " Studentname='" & txtStudentName & "'" bwhere = True End If
If chkFStudentID.Value = 1 And txtFStudentID.Text <> "" Then If bwhere Then wherestr = wherestr + " and "
wherestr = wherestr + " Studentid like '%" & txtFStudentID & "%'"