locked
Subform colmn widths RRS feed

  • Question

  • I have a subform that has columns that will not stay at a fixed size.  I have 6 columns in my subform.  The columns are named FTID, Business name, status, assign by, date assigned and assigned by. Cany you provide me the code and how to enter it to set the filed to say 1inch each?

    Thank you for any help you are willing to give.
    Thursday, April 13, 2017 11:31 AM

All replies

  • Is your subform in Datasheet view? If so, then you can set the width of a column like this:

    Me.NameOfYourControl.ColumnWidth = 100

    Obviously, you'd change "100" to whatever width you want. The value of the ColumnWidth is in Twips, so to set it to 1" you'd use a value of 1440 (1440 Twips = approximately 1 Inch). If you want to set it to "autofit" the text, set the value to -2.


    -- Scott McDaniel, Microsoft Access MVP

    • Proposed as answer by Chenchen Li Wednesday, April 26, 2017 6:15 AM
    Thursday, April 13, 2017 12:15 PM