What do I need to do in order to remove the "ghost" columns at the end of my sub-form? I want the end of the subform to be the end of the scroll, not have empty "whitespace" at the end....
Database1.zip
What do I need to do in order to remove the "ghost" columns at the end of my sub-form? I want the end of the subform to be the end of the scroll, not have empty "whitespace" at the end....
Database1.zip
When you have a subform as a Datasheet then the width of the columns is set to a default and the user can make the columns wider or narrower as they choose. For this reason you give them as much space as they need to show all the data. You can make your subform width the size of the columns at their default width, which will remove any extraneous white space to the right of the columns.
I updated my sub-form so that all columns will open "expanded" - but when the subform opens from the parent form it is automatically reducing the size of the columns?
Not sure what "expanded" means, but if you set the size of the column it should keep it that way. Here is how to do it: https://www.experts-exchange.com/que...cess-form.html
By expanded I meant extended the width of all columns so the full header is being displayed. I tried to add the syntax from your link to my current VBA (which unhides any hidden column in the subform) and unfortunately setting the width to 100 does not remove the ghost spaces at the end.Not sure what "expanded" means, but if you set the size of the column it should keep it that way. Here is how to do it: https://www.experts-exchange.com/que...cess-form.html
Code:For Each ctl In Me.Controls("FormatedCumulativeData subform").Controls If InStr(ctl.Tag, "DE") > 0 Then ctl.ColumnHidden = False ctl.ColumnWidth = 100 'ctl.ColumnWidth = -1 'ctl.ColumnWidth = 1 End If Next ctl
Both of the suggestions in that post worked for me, not sure why it doesn't work for you. 100 is of course really really narrow!