Funtion for Record of Total Records

Pisteuo

Registered User.
Local time
Today, 06:36
Joined
Jul 12, 2009
Messages
72
I have an A2007 report that includes 8 tickets per page. Each ticket represents a query record.

I would like to show which "record of total records" a specific ticket represents, much like "=[Page] & " of " & [Pages]". The page function returns 1 of 3 when there are 24 tickets on 3 pages. I need it to say 1 of 24.

Is there a function available for this? =Count(*) gets me half way there.

Thank you.
 
You can use the OnFormat event of the header to get the RecordsetClone.RecordCount after a RecordsetClone.MoveLast and then save it in a public variable for the report.
 
I tried it with RecordSet because I could not get RecordsetClone to work. RecordSet gave me essentially the same count as =Count(*) - a total count of records in the report.

Will RecordSetClone help me return a count differently than RecordSet would for records up to the OnFormat record?

Should I experiment with Bookmark?

Additionally, the underlying query is unfiltered. The report criteria comes from a VBA event.

Thanks again.
 
The RecordCount is not guaranteed accurate until you have done a .MoveLast. You can move the record pointer of the RecordsetClone without affecting the Recordset pointer. What do you mean when you say "I could not get RecordsetClone to work"? What happened?
 

Users who are viewing this thread

Back
Top Bottom