rs.Findfirst "fieldname='" & var & "'"
试试看。

解决方案 »

  1.   

    i think it's a recordset type problem.
    set rs=db.openrecordset(表名)  - return a default type : table type
    But findfirst function can only be used in dynaset or snapshot recordset
    so change into:
    set rs=db.openrecordset(表名,dbopendynaset)
    Try.
        
        
        
        
      

  2.   

    set rs=db.openrecordset("select * from 表名 where 字段='" & 字段值 & "'")    
        
      

  3.   

    首先应该确认你的“字段名”和“字段值”类型是否正确?如果正确,还要看此字段的类型是什麽类型,类型不同写法也不同,比如是字符串类型你的写法应该正确,如果是数字类型为:rs.findfirst 字段名 & "=" & 字段值 。
    如果是时间类型应为:rs.findfirst 字段名 & "=" & "#" & 字段值 & "#"
    如果再不行改为常量是一下,实在不行把它发给我,我给你看看!