J
JohnE
I am replacing the Access record counting with a textbox in the footer
(txtNumber) and using the following code placed in the forms OnCurrent event.
Dim lngCount As Long
Set rst = Me.Recordset.Clone
If rst.EOF = False Then
With rst
.MoveFirst
.MoveLast
lngCount = .RecordCount
End With
Me.txtNumber = "Record " & Me.txtNumber & " of " & lngCount
Else
Me.txtNumber = "Record 0" & " of 0"
End If
It is Access 97 and the code fails at the Recordset word of the Set rst =
Me.Recordset.Clone line. All of this works in A2k and after. Is there
something else that should be used for Access 97?
Thanks for reviewing.
.... John
(txtNumber) and using the following code placed in the forms OnCurrent event.
Dim lngCount As Long
Set rst = Me.Recordset.Clone
If rst.EOF = False Then
With rst
.MoveFirst
.MoveLast
lngCount = .RecordCount
End With
Me.txtNumber = "Record " & Me.txtNumber & " of " & lngCount
Else
Me.txtNumber = "Record 0" & " of 0"
End If
It is Access 97 and the code fails at the Recordset word of the Set rst =
Me.Recordset.Clone line. All of this works in A2k and after. Is there
something else that should be used for Access 97?
Thanks for reviewing.
.... John