| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 441 人关注过本帖
标题:未找到方法或数据成员 求解
只看楼主 加入收藏
ilvxcjj
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-7-6
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
未找到方法或数据成员 求解
'实现"班级查询"的功能
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 编辑 ]
搜索更多相关主题的帖子: Text1 
2011-09-12 12:41
fireking
Rank: 2
等 级:论坛游民
帖 子:34
专家分:33
注 册:2007-10-24
收藏
得分:20 
窗体Formclass2里有printstr控件吗?
 
2011-09-13 22:59
快速回复:未找到方法或数据成员 求解
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011401 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved