I'm trying to count the number of records in a recordset, but the code I'm using is causing an error. I have used this code in Access 97 but when I convert to Access 2000 I get a type 'Run-Time Error 13 Type missmatch' error. This is the code.
Dim recPosition As Recordset
Set recPosition = Me.RecordsetClone()<-this is where the error occurs
recPosition.Bookmark = Me.Bookmark
Me![RecordPosition] = "Check " & (recPosition.AbsolutePosition + 1) & " of "
recPosition.MoveLast
Me![RecordPosition] = Me![RecordPosition] & recPosition.RecordCount
recPosition.Close
P.S.- "RecordPosition" is the name of the textbox.
Thanks for your help!
Dim recPosition As Recordset
Set recPosition = Me.RecordsetClone()<-this is where the error occurs
recPosition.Bookmark = Me.Bookmark
Me![RecordPosition] = "Check " & (recPosition.AbsolutePosition + 1) & " of "
recPosition.MoveLast
Me![RecordPosition] = Me![RecordPosition] & recPosition.RecordCount
recPosition.Close
P.S.- "RecordPosition" is the name of the textbox.
Thanks for your help!