Link to home
Start Free TrialLog in
Avatar of mickeyshelley1
mickeyshelley1Flag for United States of America

asked on

How To Display The Record Count Of A Query On A Label On A Form

MsAcccess 2003
ODBC Connection : Linked Tables

Query: "PageLog" Form "Main" lable "lblDetail"
What i am trying to do is have the label caption say There are""""records entered into system...

I have tried DCount but am getting no where...

Mickey
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or, assuming that

DetailCount = me.recordsetclone.Recordcount

I use this a lot for sub-forms that contain datasheets, where I want to display the count of records displayed in the datasheet.  In this case, I also use code similar to Gustav's and use the datasheet forms ApplyFilter event to call this code again, so that the count stays up-to-date, even after the datasheet has been filtered.
Avatar of mickeyshelley1

ASKER

Works great thank you...ms
You are welcome!

/gustav