我是这样写的,添加一个LABEL1,让他来显示记录树
dim strsql as string
strsql="select count(*) from table"
rs.open strsql ,cnn,adopenstatic
rs.fields(0)=label1.caption
dim strsql as string
strsql="select count(*) from table"
rs.open strsql ,cnn,adopenstatic
rs.fields(0)=label1.caption
int_count=rs.RecordCount '得到记录集记录总数
这句话有什么问题???有问题,并且问题不小。叫人不明白。
你把记集数付给第一个字段是什么意思。
rs.movelast
rs.movefirst
debug.print rs.recordcount
不过我用的时候,就是rs.recordcount经常返回一些不正确的结果。楼上的方法我用过,但是对于纪录小于1064的表返回正确,但大于1064,rs.recordcount返回都1064!
所以能不用rs.recordcount就不用,它根本不可靠, 很用以变成程序的bug
Int_1=mrc.RecordCount