You can do that, but what should you do if the record set of that always changes, and have different fields, it could have also a horizontal scroll bar, how can you achive that. Hope there is a way (just a property) to change that backColor.
You can simply change the label Name(s) to suit the new record set or data type (via code of course). Anything is possible
I took a couple of minutes and put together the attched sample. In this sample there are two list boxes, each with a custom Header made from Labels. (you'll need to reference the DAO 3.6 Object Library)
The first list box contains a pretty simple header made from one label.
The second listbox contains a header with some additional functionality such as Sorting according to which header item is clicked upon. It contains several Labels. As the mouse passes over the Header Item title, it changes color indicating that it has focus (labels can't receive focus). As the mouse moves off the header, or to another Header item title the previous title changes back to its' original color and the title which the mouse is over now appears to gain focus. Click on any header item title and the contents of the list box is sorted according to which Header item was selected.
Double-Click on any listed item will display the complete record for that item. I have also added a little sound effects to the header when clicked upon (just for the heck of it) and the mouse pointer changes to a hand with a pointing finger when passed over the header.
This is most likely not what you are looking for but it only took a few minutes and I thought "what can it hurt...someone may benefit from the sample anyways."
I'll kep my eyes open for a simple solution to changing the ListBox header backColor. There may be a way via API's.
Thank you CyberLynx for you nice example, certainly it does good work. It suits the List boxes with known fields, in my case the fields are not always the same, clearly you can type the fields names in the lable via VB, but what I can not do, when the fields excied the width of the list box, and a horizontal scroll bar appears, then I can not scroll the lable content to suite the content of each column.