Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2003
    Posts
    4

    Unanswered: Color in a listbox

    Hi there,

    I am looking for the following Code, Control in which I can display a listbox. According to a value in the rowsource of the listbox I want that line-record to be a differtent color.

    For example. All records in the listbox with the status F have to be red, all records with the status G have to be purple.

    Any ideas, suggestions.

  2. #2
    Join Date
    Jan 2003
    Location
    Aberdeen, Scotland, UK
    Posts
    168
    do you mean a combo-box? If not do you mean you want to change the colour of a listbox by the selected item?

  3. #3
    Join Date
    Feb 2003
    Posts
    4
    Originally posted by johncameron
    do you mean a combo-box? If not do you mean you want to change the colour of a listbox by the selected item?
    Hi John,

    No combobox. An actual listbox control in which I set the rowsource through code. I have managed to change the color of the selected record but I want to set the color of a row in a listbox according to a certain value of that row.

  4. #4
    Join Date
    Dec 2002
    Location
    Glasgow, UK
    Posts
    100
    I had a similar issue and used a continuous form that was designed to look like a list box - use conditional formatting to get the colours you need.

  5. #5
    Join Date
    Feb 2003
    Posts
    4
    Originally posted by xander
    I had a similar issue and used a continuous form that was designed to look like a list box - use conditional formatting to get the colours you need.
    Hi Sander,

    I now that trick but do not want to use that because then I have to develop a form with a lot of events for every listbox i wish to use. Now I can use a generic form with the listbox and include that form as subform in my actual form. All properties, sorting and rowsources I can add by code.

    Thx. marcel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •