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 Mike Lewis 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 change the forecolor or insert picture in an msflexgrid ;

Status
Not open for further replies.

dimsis

Programmer
Aug 6, 2000
76
0
0
GR
How can i change the forecolor or insert picture in an msflexgrid while i'm adding rows ?

I'm reading a table from my database, and executing a recordset, then i add the rows into an msflexgrid control with:

With rs
Do While Not .EOF
cnt = cnt + 1
MSFlexGrid1.AddItem cnt & Chr(9) & !fieldname & Chr(9) !id & Chr(9)
.MoveNext
Loop
End With

How can i change the forecolor (ex: MSFlexGrid1.CellForeColor = &H80000005) of the third column of my example while i'm adding every row and not after it or place an image in a cell (ex: Set MSFlexGrid1.CellPicture = LoadPicture(App.Path & "\images\icon_priority.gif"))?

And btw, how can i get the current row number from the recordset instead of adding my counter (cnt in the example)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top