Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sizing a field in a report (2003)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sizing a field in a report (2003)

    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)

  3. #3
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sizing a field in a report (2003)

    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.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sizing a field in a report (2003)

    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.

  5. #5
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Salem, Oregon, USA
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sizing a field in a report (2003)

    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

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sizing a field in a report (2003)

    That's a good idea.

    I prefer to avoid SendKeys where possible; instead of

    SendKeys "+{F2}"

    you can use

    RunCommand acCmdZoomBox

  7. #7
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Salem, Oregon, USA
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sizing a field in a report (2003)

    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! <gg>
    Pat

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sizing a field in a report (2003)

    You're welcome! <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •