I’ve been trying to get my app better organized using Container Controls.
Ran into a little problem so I created an example trying to isolate the issue.
I have this listbox. In the Open Event I have this code. Works fine, populating the headers.
Me.ColumnsResizable = True
Then I create a Container Control. Cut the Listbox out of the main Window and paste it into the Container control. Looks good. The Open Event code (above) was copied as expected. Then place the Container, (with the listbox) onto the Main Window. But now when I run the app, the headers don’t show up. I believe the app is executing the Open Event because I hear the beep at the end. But no headers. Any idea why this is not working?
I tried putting the above header code in the Open Event of the Container, (with full references instead of using me prefix) but that didn’t work either. I even place the code in a button. Still, the beep goes off but the header don’t not get populated.