• sizing a field in a report (2003)

    Author
    Topic
    #443960

    Hello,

    I have a field that I am using in a form for users to put comments and I want this field to wrap the text based on information put in. For example, the text can be a few words to none. Is there a way to do this? Similar to excel wrap and expand and contrast of a cell. Thanks.

    Viewing 1 reply thread
    Author
    Replies
    • #1072318

      In the subject, you mention a report, but in your question. you mention a form.

      On a report, you can set the Can Grow and Can Shrink properties of a text box *and* of the section that contains it to Yes. The width of the text box will remain as designed, but the height will be adjusted dynamically to fit the contents.

      (A text box on a form also has Can Shrink and Can Grow properties, but these are only used when the form is printed – not a good idea – not when the form is displayed on screen)

      • #1072319

        I actually needed to get the form to Grow and Shrink for that field. I am sorry for the confusion. I want the user to be able to look back and see all the info in that field.

        • #1072321

          Text boxes on forms in Access don’t grow or shrink dynamically on screen. You can set the Scrollbars property of the text box to Vertical instead of None. That way, the user can use the scroll bar to view all text.

    • #1072338

      Besides Han’s suggestion of the scrollbars, what I like to do, especially if the text boxes are small on a crowded form, is “double-click to zoom:”
      Private Sub fSomeNotes_DblClick(Cancel As Integer)
      SendKeys “+{F2}”
      Cancel = True
      End Sub
      In conjunction to that, you can set your cursor so that be positioned at the beginning so that the zoom doesn’t select the whole field.
      I _think_ my users like it!
      thx
      Pat

      • #1072341

        That’s a good idea.

        I prefer to avoid SendKeys where possible; instead of

        SendKeys “+{F2}”

        you can use

        RunCommand acCmdZoomBox

        • #1072344

          Thank you, Hans! I so often just cut ‘n paste, and have used the better form before but just forget and revert to the sendkeys format. It’s nice to be praised by you, my hero!
          Pat

    Viewing 1 reply thread
    Reply To: Reply #1072319 in sizing a field in a report (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel