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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting the DataGrid Record question?

Status
Not open for further replies.

murphyc

Programmer
Sep 6, 2002
25
HK
I use the SQL command to select the record and display in the datagrid. But i don't know how to count how many record i select. I want to display the number of record in the label.caption. I found the VB can do the "Label2.Caption = DataGrid1.Columns.Count" But no datagrid1.row.count canbe use, so pool....!! Does anyone help me??? Thanks a lot
 
Are you using the SQL to return a recordset? If so you can use the recordset.count method to return the number of records. Much cleaner.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top