Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Nov 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have an Ms Access Report that consists of a text box control, which populates from a database field. The data could look something like this: word1/word2/word3, e.g. 'ALRIGHT/GOOD/EXCELLENT' will be populated in this text box on the report.

    Now is there a setting in the report, that ensures that during display, individual words of this data are not broken when moving on to a new line in this text control (I have set the 'can grow' property of the text box to true). So basically if there is not enough space for all words to be displayed in the text control, just display complete words possible and then move the rest of words to the next line in the text control.
    Or if there is any other control that would do so for me or any other way of achieveing this.
    Any help is appreciated

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Access isn't as intelligent as Word when it comes displaying text. It doesn't recognize / as a word delimiter, only a space. So you'd have to set the text to
    'ALRIGHT/ GOOD/ EXCELLENT'
    to force Access to break the text correctly.

  3. #3
    New Lounger
    Join Date
    Nov 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by HansV View Post
    Access isn't as intelligent as Word when it comes displaying text. It doesn't recognize / as a word delimiter, only a space. So you'd have to set the text to
    'ALRIGHT/ GOOD/ EXCELLENT'
    to force Access to break the text correctly.
    Thanks HansV, but because this data is coming from a database field, I cannot modify it to insert extra spaces.
    I thought maybe text box control/report would have some property that would take care of this like 'multiline' or something

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    A text box on a report can display text in multiple lines by default, but the algorithm that breaks lines is not very sophisticated, and as far as I know there is no way to tweak it.

    If you want to display a field named SomeText, you could use a text box with Control Source

    =Replace([SomeText],"/","/ ")

    To avoid confusion, the text box should not have the same name as the field. In this example, txtSomeText would be OK as name, but not SomeText.

  5. #5
    New Lounger
    Join Date
    Nov 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by HansV View Post
    A text box on a report can display text in multiple lines by default, but the algorithm that breaks lines is not very sophisticated, and as far as I know there is no way to tweak it.

    If you want to display a field named SomeText, you could use a text box with Control Source

    =Replace([SomeText],"/","/ ")

    To avoid confusion, the text box should not have the same name as the field. In this example, txtSomeText would be OK as name, but not SomeText.
    Thanks so much.Thats exactly what i needed to do. works like a charm.
    Thanks again.

Posting Permissions

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