Hi all,
Hopefully a simple question.
I have a listbox on my form which is based on a query. For each row in the listbox that meets specified criteria, I would like to format the row (make font italic and forecolor red).
I need to get this to work on individual rows, not the whole listbox! Any ideas?
Thanks,
Rob
Hopefully a simple question.
I have a listbox on my form which is based on a query. For each row in the listbox that meets specified criteria, I would like to format the row (make font italic and forecolor red).
Code:
Dim i As Integer
Dim intCount As Integer
i = 0
intCount = Me.lstResults.ListCount
Do
i = i + 1
If Me.lstResults.Column(12, i) = "Completed" Then
'Format listbox row
Me.lstresults.Forecolor = RGB (255,0,0)
Me.lstresults.Italic = True
Else
If i > intCount Then
Exit Do
End If
End If
Loop
I need to get this to work on individual rows, not the whole listbox! Any ideas?
Thanks,
Rob
Last edited: