the count of number of records in a form

X

XPUSER0000000001

I have a form is Continuous Forms.
There are displayed 1 to Lastrecord.
LastRecord = ???
Howmany records are there?
The same number in the Record Max in the lower left corner.
How do I get the number in MS Access Basic?
 
A

Allen Browne

You can read the value of the RecordCount of the form's RecordsetClone,
e.g.:
=[Form].[RecordsetClone].[RecordCount]

However, that displays the number of records accessed so far. So when the
from initially loads, or just after a filter applied, it may display 1
unless you MoveLast on the RecordsetClone first to force all records to load
before you read the RecordCount.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Top