Office中国论坛/Access中国论坛

标题: [求助]ADO视图(VIEWS)为何找不到 [打印本页]

作者: 阿丰    时间: 2004-11-10 16:35
标题: [求助]ADO视图(VIEWS)为何找不到
我先建立一个查询名为“_table”,有以下代码:

    Dim cat As New ADOX.Catalog

    Dim cmd As New ADODB.Command

    Set cat.ActiveConnection = CurrentProject.Connection

    cmd.CommandText = strSQL

    cat.Views.Refresh

    Set cat.Views("_table").Command = cmd

    DoCmd.OpenQuery "_table", acViewNormal, acReadOnly

    Set cat = Nothing

    Set cmd = Nothing

运行时出错,提示为“运行时错误‘3265’:在对应所需名称或序数的集合中,未找到项目。”请帮忙。




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3