make a records counter in a form

K

kh0123

I want to make a records counter using a text box in a form to show like
that: (record: 2 of 15 ) exactly as shown in the navigation buttons in the
same form
 
A

Al Camp

kh0123,
I have a file on my website (see below) called Record Statistics (for version 97 or
2003), which demonstrates how to do what you are looking for.

It not only indicates what record of how many the user is on, but also indicates any
applied filtering.

ex. 23 of 200 of 450
means...
Record 23 of 200 records filtered from a total of 450
 
G

Gina Whipp

I don't remember where I got it but it works...

On your form put a text box, mine is named txtPage

In the On_Current event of the form place

With Me.RecordsetClone
.MoveLast
Me.txtPage = Me.CurrentRecord & " of " & .RecordCount & " line(s)"
End With

HTH,
Gina
 
Top