首先在窗体的load事件中加入:TDBgrid1.FetchRowStyle=true ---------- Private Sub TDBGrid1_FetchRowStyle(ByVal Split As Integer, Book As Variant, ByVal RowStyle As TrueOleDBGrid70.StyleDisp) if val(TDBGrid1.Columns(该行字段名).CellText(Book))<60 Then '//red RowStyle.ForeColor = vbRed end if End Sub
然后将它的字体设为红色的,,,,也可以设置FORECOLOR为红色的即可,,,
----------
Private Sub TDBGrid1_FetchRowStyle(ByVal Split As Integer, Book As Variant, ByVal RowStyle As TrueOleDBGrid70.StyleDisp)
if val(TDBGrid1.Columns(该行字段名).CellText(Book))<60 Then
'//red
RowStyle.ForeColor = vbRed
end if
End Sub
RowStyle.BackColor = vbRed