Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I count the total records in the grid? 1

Status
Not open for further replies.

greenilo

IS-IT--Management
Aug 10, 2005
10
US
Dear Anybody,

Suppose after refreshing my grid from a filter command, it showed 6 records on the file, how can I put the no. 6 as the total count into my text box? (Same as counting the total records)?

Thank you.
 
make a property called lnGridCount

In the method that refreshes the grid type in:

thisform.lnGridCount = reccount()

Or

in your select statement that creates the grid add this line:

thisform.lnGridCount = _tally




Don Higgins
 
greenilo

Beware deleted records - if you have
Code:
[COLOR=blue]SET DELETED ON[/color]
and you have any deleted records in the table/cursor the RECC() value will include deleted records.
Code:
[COLOR=blue]SET FILTER TO
COUNT FOR !DELETED() TO lnCount[/color]
lnCount will be the total unfiltered records available in the grid.

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.net
PDFcommandertm.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top