I can't believe this simple thing of coloring a listbox item is not implemented in the latest MS Office 365, and one must come out with this kind of mambo jumbo design and coding. I can't even believe the VBA editor is completely the same as it was 20-25 years ago when I last time did some simple Access forms in Windows 98 / XP. So it looks like Office 365 is an Office 97 with some fancy CSS applied on the UI. I wonder what are all developers at Microsoft Office department doing all these years ?!
A list box with rich text is easier to fake because it is always opened. But a fake combo box that can open and collapse, open when F4 is pressed, shut when Esc is pressed, etc. would be considerably more work. The ability to store an invisible column as the bound field is also a tricky thing to fake. A combo box can also auto-complete as you type and go straight to the matching item on the list, which is another thing you have to duplicate. A combo box can also open upward if it is near the bottom of the screen. It can even detect the edge of your monitor screen so it always stays visible. It can even open when it is TOTALLY OFF THE SCREEN (when you press F4)! This is a magical combo box, and it's tough to duplicate. It's possible (I guess) to create a near-exact copy of it, but you would probably find that it is just too much more effort than it is worth.
Hi Richard, I just posted a reply to someone on your 599cd site forum under General Access Forum, subject "Combo box formatting." The original poster asked a **most interesting** question that I had to dig deep into my memory to find an answer. You may make a video out of it as well. The poster saw different colors in the columns of her combo box and wondered why. I replied that this is in fact an Access feature (a very old one too). In table design, the Format property of each field actually sets the display color of the field whenever and wherever the table's data are displayed: in datasheets, queries, data from SQL constructed in VBA, etc. If a combo box has a rowsource that uses such a table, it will "inherit" the color settings from that table's design. The Format string looks something like: [Blue];@ . Not many colors are available, and the colors look ugly, so this feature is not much use for formatting the look of combo boxes. But this may make a great follow-up video to this video. P.S. When I posted the video on your 599cd site forum, it used my real name that was tied to my payment info. Is it possible to change my display name to rabid follower? It's not a big deal if it isn't.
Sure. If the field is a Currency field, the list box should automatically format it as Currency. If not, you can specify using the Format function in the SQL of the Row Source: Format(MyField,"Currency")
Sure, you can reference properties for control that don't have focus. From anywhere on a form, you could say FirstName.Visible = True or something like that.
I can't believe this simple thing of coloring a listbox item is not implemented in the latest MS Office 365, and one must come out with this kind of mambo jumbo design and coding.
I can't even believe the VBA editor is completely the same as it was 20-25 years ago when I last time did some simple Access forms in Windows 98 / XP.
So it looks like Office 365 is an Office 97 with some fancy CSS applied on the UI.
I wonder what are all developers at Microsoft Office department doing all these years ?!
[Whistles to himself]
A list box with rich text is easier to fake because it is always opened. But a fake combo box that can open and collapse, open when F4 is pressed, shut when Esc is pressed, etc. would be considerably more work. The ability to store an invisible column as the bound field is also a tricky thing to fake. A combo box can also auto-complete as you type and go straight to the matching item on the list, which is another thing you have to duplicate. A combo box can also open upward if it is near the bottom of the screen. It can even detect the edge of your monitor screen so it always stays visible. It can even open when it is TOTALLY OFF THE SCREEN (when you press F4)! This is a magical combo box, and it's tough to duplicate. It's possible (I guess) to create a near-exact copy of it, but you would probably find that it is just too much more effort than it is worth.
Yeah... that's why I say if you REALLY need those colors, the subform trick works well.
Hi Richard, I just posted a reply to someone on your 599cd site forum under General Access Forum, subject "Combo box formatting." The original poster asked a **most interesting** question that I had to dig deep into my memory to find an answer. You may make a video out of it as well. The poster saw different colors in the columns of her combo box and wondered why. I replied that this is in fact an Access feature (a very old one too). In table design, the Format property of each field actually sets the display color of the field whenever and wherever the table's data are displayed: in datasheets, queries, data from SQL constructed in VBA, etc. If a combo box has a rowsource that uses such a table, it will "inherit" the color settings from that table's design. The Format string looks something like: [Blue];@ . Not many colors are available, and the colors look ugly, so this feature is not much use for formatting the look of combo boxes. But this may make a great follow-up video to this video. P.S. When I posted the video on your 599cd site forum, it used my real name that was tied to my payment info. Is it possible to change my display name to rabid follower? It's not a big deal if it isn't.
Inspiration for: 599cd.com/ColumnColors
Thanks so much
You're welcome!
Is there any way to format numbers in an access listbox as currency?
Sure. If the field is a Currency field, the list box should automatically format it as Currency. If not, you can specify using the Format function in the SQL of the Row Source: Format(MyField,"Currency")
You cant reference a property or method for a controle unless the control has the focus
Why this error message appear when the form run
Sure, you can reference properties for control that don't have focus. From anywhere on a form, you could say
FirstName.Visible = True
or something like that.
Pls, how to apply color to a listbox Column header.
Can't be done. Don't use column headers in list boxes. Put labels above each column and color those however you like.
I set columnsheaders to no and just make a textbox above. Then you can change the textbox any color and even center it.
👍
:)
Guru
Who... me? :)