AdoTable1.Filter:=
(mytype='SF') and ((id='001') or (id='002') or (id= '003'));报错:---------------------------
Debugger Exception Notification
---------------------------
Project MO.exe raised exception class EOleException with message '变量或者类型不正确,或者不在可以接受的范围之内,要不就是与其他数据冲突。'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help   
---------------------------检查字段名没错,不知道是哪的错?
难道不支持and or 连用??

解决方案 »

  1.   

    AdoTable1.Filter:='mytype='''+SF+''' and ((id=''001'') or (id=''002'') or (id= ''003''))';
      

  2.   

    如果是单引号的问题,为什么
    AdoTable1.Filter:=(mytype='SF') and (id='001')
    没问题呢?
      

  3.   

    AdoTable1.Filter:=(mytype='SF') and (id='001')
    没有问题??你能编译通过我吃了它-_-\\
      

  4.   

    to:jinjazz
    sorry,忘了说一下,
    (mytype='SF') and (id='001')使用一个函数生成的AdoTable1.Filter:=MyFunction;