Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display the number of table records in a form

Status
Not open for further replies.

swk003

IS-IT--Management
Feb 10, 2004
86
GB
Hi, I am having a few problems writing code to display in a form the number of records updated to my table . I have tried to write code with counter incrementation, but hitting problems as my programming is very basic. Someone suggested adding an autonumber field to the data table that I am adding records to and then display the value of the autonumber, Does anyone have any similar code?

thanks

Simon
 
Hi,
Put a label on the form Footer and use this code on the Current Event of the Form. AutoNumber field is not always true because if you delete a row you will be missing that number from the row.
Code:
Private Sub Form_Current()
Label1.Caption = Me.Recordset.AbsolutePosition + 1 & " of " & Me.Recordset.RecordCount
End Sub

Regards

Zameer Abdulla

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top