xtraterrestrial
Programmer
Hi I have the following code in a form to count the number of records in a table
Private Sub Form_Current()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
lblRecordNum.Caption = rs.RecordCount
rs.Close
Set rs = Nothing
End Sub
When I first start up the form the number of record seems to be only 1. I have to move to a new record before the real number of records show up. I tried putting the code into Form_Load and get the same results. Any suggestioins?
Private Sub Form_Current()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
lblRecordNum.Caption = rs.RecordCount
rs.Close
Set rs = Nothing
End Sub
When I first start up the form the number of record seems to be only 1. I have to move to a new record before the real number of records show up. I tried putting the code into Form_Load and get the same results. Any suggestioins?