未找到方法或数据成员 求解
'实现"班级查询"的功能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
求帮助,显示的是红色部分能错误
[ 本帖最后由 ilvxcjj 于 2011-9-12 12:44 编辑 ]