none
List box colors RRS feed

  • Question

  • Here's an interesting problem.

    Working with Access 2013, I created a simple list box whose values come from a query.  Data displayed is mixed:  a few numbers, a date field, and two text fields in each row of the list box.

    If I set the background color to white, and the forecolor to black, you get what you'd expect, and all values are displayed in black.

    But, if you set the color to, say, dark blue, and the forecolor to white, the number and date values are showing up as white, but the text fields are showing up as black (hardly visible against a dark blue background).

    Does anybody know why different data types are displaying differently?

    Tuesday, February 13, 2018 9:42 PM

All replies

  • Hi Rich30005,

    You had mentioned that,"if you set the color to, say, dark blue, and the forecolor to white, the number and date values are showing up as white, but the text fields are showing up as black"

    I try to make a test on my side.

    It looks like when you assign the value to List box then it selects the text field value. so it is displaying as black.

    What if you try to change the selection , Does date and number field also display in black color as above or you can see in white color?

    If it is displaying the selected value in black then you can try to apply the different theme. It will solve your issue.

    Reference:

    Video: Improve the appearance of your Access forms and reports with Office Themes

    If I misunderstand something in your above description then let me know about it. I will try to correct myself.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 14, 2018 3:06 AM
    Moderator
  • Thanks for the insight, Deepak, and for the quick response.  I'll play with this further and let you know.

    Rich

    Wednesday, February 14, 2018 2:14 PM
  • Unfortunately, playing with Office themes didn't address the issue. In your example above, you need to add multiple records to the list box to see the problem. Below is an image I'm seeing. The 3rd and 5th column has data for every record, but it shows in black except for the selected record. Very odd that when the fore color property for this list box object is set to white, Access does so selectively. I can't explain it except to note that the columns showing as black are text fields (as opposed to numbers or dates.

    I'm stumped.

    Wednesday, February 14, 2018 2:56 PM
  • This a default parameter in your table design view.

    Open the table and check for each field the "format" property.

    For a text field, by default you have @.

    Delete the @ and your problem is solved ^^

    Thursday, November 28, 2019 5:37 PM