Changing Listbox Text Color (1 Viewer)

Cotty42

Registered User.
Local time
Today, 00:07
Joined
Feb 27, 2014
Messages
102
Hi All

I have an unbound listbox on a form which displays a list of staff, both past and present, based on an SQL query.

I want to be able to differentiate between current and past staff using different colors, i.e. Black text for current employees and red for employees who have left, based on a field (True/False) in the original staff table.

Anyone know if this is possible and, if so, how.

Many Thanks

Dave
 

N1755L

Registered User.
Local time
Yesterday, 19:07
Joined
Mar 18, 2014
Messages
16
How about a checkbox beside the listbox, named "List Past Employees", that way, if it's not checked, you see a list of only current employees, and if it's checked, you see a list of only past employees.

A quick on-the-fly way of listing one or the other employee class.
 

N1755L

Registered User.
Local time
Yesterday, 19:07
Joined
Mar 18, 2014
Messages
16
Another possible way is that your query would have a column that would contain a C or P (Current or Past, of course) for each employee record, so then your list would show the C or P in a column in the list just in front of the employee name.

Hmmm... you probably asked about the color differentiation 'cause you'd already thought of this or used a similar scheme, but wanted something that would make the difference more quickly visual... yeah, likely.

I guess the checkbox idea above would be the best option then.
 

Users who are viewing this thread

Top Bottom