Show Total Records in a Table on a Form

m17347047711116

Registered User.
Local time
Today, 20:15
Joined
Feb 4, 2002
Messages
68
Would like to put a box on my form that tells me how many records are in the under lying form.
 
Creat and unbound control then on the On Current property of the form create an Event Procedure as follows

Dim dbs As Database
Dim rst As Recordset

Set dbs = CurrentDb()
Set rst = Forms![frmName]!Form.RecordsetClone

Me.UnboundControl = rst.RecordCount
 
This should work too...

Me.RecordsetClone.MoveLast
Me.UnboundControlName = Me.RecordsetClone.RecordCount

hth,
Jack
 
You are welcome from both of us, though it is somewhat pretentious for me to speak for the other poster....

Jack
 
Being pretentious is OK Jack! Your approach should actually be more streamlined. Mine was based on a subform total being stated on the main form!!!
 
Thanks for saying it was OK to be pretentious!

There are a lot of ways to skin a cat and we just gave the poster two of them...

Jack

PS. No cats were injured during the writing of this message...
 

Users who are viewing this thread

Back
Top Bottom