Count the records on a sub form

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

I have a form with many subforms on it, and on the
subforms I want to make my own navigation buttons, as the
default Navigation buttons are confusing to some of my
users.

I know how to do the buttons for next, prev, etc., but I
also want to show them how many records there are (I
know, -- count([fieldname]), that tells them the total
number of sub records in the current record. But, how do
I tell them they are on record 1 of 20?

Please...........
 
-----Original Message-----
I have a form with many subforms on it, and on the
subforms I want to make my own navigation buttons, as the
default Navigation buttons are confusing to some of my
users.

I know how to do the buttons for next, prev, etc., but I
also want to show them how many records there are (I
know, -- count([fieldname]), that tells them the total
number of sub records in the current record. But, how do
I tell them they are on record 1 of 20?

Please...........
.
Hi Kathy,

try Me.Recordset.RecordCount

Luck
Jonathan
 
-----Original Message-----
I have a form with many subforms on it, and on the
subforms I want to make my own navigation buttons, as the
default Navigation buttons are confusing to some of my
users.

I know how to do the buttons for next, prev, etc., but I
also want to show them how many records there are (I
know, -- count([fieldname]), that tells them the total
number of sub records in the current record. But, how do
I tell them they are on record 1 of 20?

Please...........
.
Kathy here's a better example to answer your question...

Private Sub Form_Current()
lblRecNo.Caption = "Record " & Me.CurrentRecord _
& " of " _
& Me.Recordset.RecordCount _
& " records"
End Sub

Luck
Jonathan
 
Back
Top