INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

vbCrLf / + Chr(13) + Chr(10) Carriage Returns in A Report

vbCrLf / + Chr(13) + Chr(10) Carriage Returns in A Report

(OP)
= "HX: PF | EPF | DET | COMP" + Chr(13) + Chr(10) & "EX: PF | EPF | DET | COMP"

I am storing the above string in a table. The forms and reports are currently displaying the string exactly as above. When a form or report pulls the field, I would like it to do the carriage returns and appear as below.

HX: PF | EPF | DET | COMP"
EX: PF | EPF | DET | COMP

Does anyone know of a way to get the forms and reports to recognize the carrage returns?

Thanks a bunch.

Bill

RE: vbCrLf / + Chr(13) + Chr(10) Carriage Returns in A Report

I updated a field in a table using this expression:
"HX: PF | EPF | DET | COMP" + Chr(13) + Chr(10) & "EX: PF | EPF | DET | COMP"
When I added this field to a text box in a report, it appeared on two lines.

HX: PF | EPF | DET | COMP
EX: PF | EPF | DET | COMP

Duane
Hook'D on Access
MS Access MVP

RE: vbCrLf / + Chr(13) + Chr(10) Carriage Returns in A Report

(OP)
I tried it, and it's still doing the same thing on mine. I presently have the field formatted as memo. How is yours formatted?

RE: vbCrLf / + Chr(13) + Chr(10) Carriage Returns in A Report

I tried in a text 255 field. Maybe I'm confused by what exactly you are storing. When you view your data in table/datasheet view, do you see the "Chr(13) + Chr(10)", or small squares, or are there two lines?

If you see Chr(13) + Chr(10) you could try a control source in your report using Replace()

CODE --> ControlSource

=Replace([Your Field Name],"Chr(13) + Chr(10)", Chr(13)&Chr(10)) 

Duane
Hook'D on Access
MS Access MVP

RE: vbCrLf / + Chr(13) + Chr(10) Carriage Returns in A Report

(OP)
It's currently stored in a table as a memo field. I have it as = "HX: PF | EPF | DET | COMP" + Chr(13) + Chr(10) & "EX: PF | EPF | DET | COMP" in the field. When I run the report, I want it to show as two lines.

HX: PF | EPF | DET | COMP
EX: PF | EPF | DET | COMP

Do you know of a way to get the report to recognize the carriage returns, or do you know of another way to store the string in the field so this will work?

RE: vbCrLf / + Chr(13) + Chr(10) Carriage Returns in A Report

(OP)
Thank you so much to everyone that responded. I found a solution on another forum that works, and I want to share it, with the hopes that it will help you in the future. The solution is to use the break code like you use for html, and then set the field on the report to Rich Text. The Rich Text enables the html to be interpreted.

HX: PF | EPF | DET | COMP<Br>EX: PF | EPF | DET | COMP<Br>MDM: SF | LOW | MOD | HIGH

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close