J
Jeff via AccessMonster.com
Is there a faster way to retrieve the record count of a given criteria
---without using DCount---
---without looping through a recordset object---
For example:
I do NOT want to do this:
---
myVariable= DCount("myField", "MyTable", "myCriteria")
---
and I do NOT want to do this:
---
dim db as database, rs as recordset, myVariable as long
set db=currentdb
set rs=db.openrecordset("select * from myTable where myCriteria")
with rs
.movelast
.movefirst
myVariable = .recordcount
end with
rs.close
set rs=nothing
db.close
set db=nothing
---
?? Any suggestions?
Thank you,
Jeff
---without using DCount---
---without looping through a recordset object---
For example:
I do NOT want to do this:
---
myVariable= DCount("myField", "MyTable", "myCriteria")
---
and I do NOT want to do this:
---
dim db as database, rs as recordset, myVariable as long
set db=currentdb
set rs=db.openrecordset("select * from myTable where myCriteria")
with rs
.movelast
.movefirst
myVariable = .recordcount
end with
rs.close
set rs=nothing
db.close
set db=nothing
---
?? Any suggestions?
Thank you,
Jeff