Results 1 to 6 of 6
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    670

    Why Does Subform show "Ghost" Columns at the end?

    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

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    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.

  3. #3
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    670
    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?

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    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

  5. #5
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    670
    Quote Originally Posted by aytee111 View Post
    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.
    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

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    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!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 07-12-2016, 11:25 AM
  2. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  3. Replies: 1
    Last Post: 08-29-2015, 12:56 AM
  4. "Add user" subform won't show up!
    By apc0243 in forum Access
    Replies: 2
    Last Post: 01-26-2015, 02:29 PM
  5. Replies: 1
    Last Post: 12-11-2008, 01:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums