我是这样写的,添加一个LABEL1,让他来显示记录树
dim strsql as string
strsql="select count(*) from table"
rs.open strsql ,cnn,adopenstatic
rs.fields(0)=label1.caption

解决方案 »

  1.   

    dim Int_count as integer
    int_count=rs.RecordCount  '得到记录集记录总数
      

  2.   

    mrc.Fields(0) = mrc.RecordCount
    这句话有什么问题???有问题,并且问题不小。叫人不明白。
    你把记集数付给第一个字段是什么意思。
      

  3.   

    你是想得到记录集的记录总数?
      rs.movelast
      rs.movefirst
      debug.print rs.recordcount
      

  4.   

    用rs.recordcount之前要加上rs.movelast,
    不过我用的时候,就是rs.recordcount经常返回一些不正确的结果。楼上的方法我用过,但是对于纪录小于1064的表返回正确,但大于1064,rs.recordcount返回都1064!
    所以能不用rs.recordcount就不用,它根本不可靠, 很用以变成程序的bug
      

  5.   

    adodb中的记录集有RecordCount属性。
      

  6.   

    dim Int_1 as integer
    Int_1=mrc.RecordCount