
Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
Indeed, the movelast will take much the same time, if not more, since
filling the recordset has probably more overhead than getting a scalar
value.
An explicitly built SQL statement, with ADO, could look like
CurrentProject.Connection.Execute("SELECT COUNT(*) FROM
tblCoils").Fields(0).Value
Vanderghast, Access MVP
> Dim rsCurr As DAO.Recordset
>
[quoted text clipped - 56 lines]
>>> >
>>> > what would someone suggest?
onedaywhen - 02 Mar 2007 11:45 GMT
On Mar 1, 7:53 pm, "Michel Walsh"
<vanderghast@VirusAreFunnierThanSpam> wrote:
> An explicitly built SQL statement, withADO, could look like
>
> CurrentProject.Connection.Execute("SELECT COUNT(*) FROM
> tblCoils").Fields(0).Value
I suspect the table cardinality is *maintained* in the information
schema 'statistics', in which case retrieving it follows could be more
efficient than querying the table:
? CurrentProject.Connection.OpenSchema(adSchemaStatistics,
Array(Empty, Empty, " tblCoils")).Fields("CARDINALITY").Value
Jamie.
--