Just a quick note.
I was working on a little sample I wanted to post here and thought I was loosing it when I couldn’t get a textbox to go in front of a listbox. I tried using the ‘Bring to front’ & ‘Send to back’ commands numerous time, nothing worked. I was as perplexed as our turkey friend here!
I thought it had to be me doing something blatantly wrong so I reached out to the Access Dev Team only to have them confirm the behavior. They informed me that it wasn’t possible.
Say What?! Is someone pulling my leg?
I can successfully place a textbox on top of a textbox, combobox, checkbox, …,command button, web browser, …, but not a listbox? Seriously.
I haven’t tried all the control’s, but so far the listbox is the only exception.
You simply can’t superimpose a textbox, label, combobox, checkbox, command button, web browser … on top of a listbox. The listbox always remain on top no matter what you do.
I know the Dev Team won’t view it as one, but when a control doesn’t follow the behavior of other controls, it is a bug to me. Furthermore, what is the point of having the ‘Bring to front’ & ‘Send to back’ commands available if they do nothing? So a second issue/bug IMHO.
It would be so useful to simply have a z-order property for all controls and have it available via VBA at runtime (not just design time), but I won’t be holding my breath on that ever happening.
I’ve come up with a workaround that suits my needs, but wanted to quickly share this information in case someone else thinks they are loosing it while trying to do the same thing. It’s not you, it actually is them in this case! lol! 🙂
This is a bug/feature that has been around forever, Daniel!
Below is a link to an old UA post of mine from 2005(!) where I noted in the TODO’s that I needed to work out a way to display something on top of a listbox!
https://www.utteraccess.com/topics/735057
I never worked out a solution, I don’t think!
Well, I’m in good company then. As they say: “misery loves company!” 🙂
I never meant to infer that this was a new bug. As you point out quite accurately, this has been around for a very long time! Nothing new.
I do believe there are APIs that could change an element’s z-index, but I was trying to develop a simple app and APIs just muddy the water to much.
I have been beating my head on this for some time now. Thanks for the clarification. However, would you mind sharing your fix to this?