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!

Datagrid Column 1

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I am trying to auto populate a field in a datagrid based on the number of records returned..

Dim ID As Integer

ID = DataGrid.Columns(6).Text
ID = 1

rs.MoveFirst
Do Until Not rs.EOF
rs.MoveNext
ID = ID + 1
Loop

so it would display numbers down the side like Excel..

any help would be appreciated
Thanks
 


Dim ID As Integer

ID = 1

rs.MoveFirst

Do while Not rs.EOF
'If you want column 6 populated
DataGrid.Columns(6).Text = CStr(ID)
ID = ID + 1
rs.MoveNext
Loop

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top