Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    Tasmania
    Posts
    58

    Unanswered: CR LF in access report

    how do I put a CR LF in text field of report ?

    I add additional text to a text box, but want it on a new line.

    The text box contains:

    ="bit of text" & IIf(IsNull([TestComment]),"","CHR(13) & [ Notes: " & TestComment])

    this gives me a little box before the "Notes..."
    catkins

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Use the vbNewLine Constant. For Example:

    ="bit of text" & IIf(IsNull(Me.TestComment),"", vbNewLine & "Notes: " & Me.TestComment)

    or you can use the constant, vbCrLf. I personaly prefer vbNewLine.


  3. #3
    Join Date
    Dec 2003
    Location
    Tasmania
    Posts
    58
    thanks - but now access doesn't like that.

    I tried this as a test:
    ='abc' & vbnewline & 'def'

    Access changed this to :
    ='abc' & [vbnewline] & 'def'

    & then gave error when I previewed it
    catkins

Posting Permissions

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