count records

peterbowles

Registered User.
Local time
Today, 14:30
Joined
Oct 11, 2002
Messages
163
I have used this code before to count records on a form and it worked but now is does not any ideas?

Dim myrecords As Recordset
Set myrecords = Form.RecordsetClone
Me.txttot = myrecords.RecordCount

is there another way to count the no. of records on a form

thanks
 
I use RecordsetClone in my forms to give the X of Y count. Does this work for you?

Code:
MsgBox "Total records = " & Me.RecordsetClone.RecordCount
Are you missing any references? If not, deselect one that is okay and then reselect it to force a refresh.

HTH
 
Last edited:

Users who are viewing this thread

Back
Top Bottom