Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

Programmatically resize subform datagrid display

I need a way to programmatically adjust the size of the columns in a subform so the scrollbar goes away.

Something akin to double-clicking the column seperators to force them to the size of the header.

Here is a picture depicting what I want to accomplish:

http://www.robotzgame.com/junk/subform_resize.gif

Thanks,

Tom
ASKER CERTIFIED SOLUTION
Avatar of Jokra_the_Barbarian
Jokra_the_Barbarian
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom Knowlton

ASKER

Or how about this?

Private Sub ResizeCommentsSubForm()
    Forms![frmEntriesForm]![frmCommentsSUB]![TimeStamp].ColumnWidth = -1
    Forms![frmEntriesForm]![frmCommentsSUB]![CommentType].ColumnWidth = -1
    Forms![frmEntriesForm]![frmCommentsSUB]![Comment].ColumnWidth = 4000   'twips
End Sub

(I found my old code for handling this)