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

Loop Throw rows in datagrid

Status
Not open for further replies.

prprogrammer

Programmer
Jun 25, 2004
49
PR
I want to loop throw rows in datagrid...
 
Presumably "throw" should have been "through" ...

Your datagrid must have a recordsource ... probably a recordset. If so
Code:
if NOT rs.EOF then rs.MoveFirst
Do Until rs.EOF
    ' do Stuff
    rs.MoveNext
Loop
Where "rs" is the recordsource for your datagrid.
 
That move through a recordset.....I want to move in datagrid..
row per Row....like in MSFlexGrid with textmatrix....etc
 

Code:
Dim LCV As long
Dim str As string

For LCV = 1 to MSFlexGrid.Rows - 1 '0 is the headers
    str = MSFlexGrid.TextMatrix(LCV, 0) ' Or whatever column you wish to reference
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top