You can use the Record count and absolute position properties of the Data Control Recordset to display the RecordNum and RecordCount when viewing DataBase Records.
Example:
Record 10 of 45
The RecordCount property holds the number of records in a recordset.The absolute position holds the position of the current Record in the Recordset.However absolute postion is zerobased i.e; the first record has an absolute position of 0.Therefore, you must add 1 to the proprty to produce the RecordNum.
Example:
IntCurrentRecord = Data1.Rescordset.Absolute postion + 1
You cannot use the absolute position property as a record Num , because the position num changes as records are added and deleted.
Example:
Private sub Record Num( )
Dim RecordCount, CurrentRecord as integer
RecordCount = Data1.Recordset.RecordCount
CurrentRecord = Data1.Recordset.Absolute Position + 1
If Data1.Recordset.eof then
Data1.Caption = “EOF”
else
Data1.Caption = ” Record ” & CurrentRecord & ” of ” & RecordCount
Endif
End sub