A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Line Break with condition



 
 
Thread Tools Display Modes
  #1  
Old July 12th, 2007, 04:56 PM posted to microsoft.public.access.reports
rml
external usenet poster
 
Posts: 172
Default Line Break with condition

How can I make a field break to a new line?

Example: This is a test to see the break. This is the next line.

I would like it to appear like this in my field:

This is a test to see the break.
This is the next line.

I would like it to break on a "period" and eliminate the two spaces after
the "period" and goto the next line.

Thanks.
  #2  
Old July 12th, 2007, 05:22 PM posted to microsoft.public.access.reports
krissco
external usenet poster
 
Posts: 167
Default Line Break with condition

On Jul 12, 7:56 am, rml wrote:
How can I make a field break to a new line?

Example: This is a test to see the break. This is the next line.

I would like it to appear like this in my field:

This is a test to see the break.
This is the next line.

I would like it to break on a "period" and eliminate the two spaces after
the "period" and goto the next line.

Thanks.


You can change the control source for the text field to the following:
Currently: [testString]
Change To: =replace([testString], ". ", "." & Chr(13) & Chr(10))

Two caveats:
1. Replace testString with the field name that holds your data.
2. Make sure the control has a different name than the field name.

-Kris

  #3  
Old July 13th, 2007, 11:22 AM posted to microsoft.public.access.reports
rml
external usenet poster
 
Posts: 172
Default Line Break with condition

The field name the holds the data is "Description" I followed your
instructions but get an error when I open the report? It's looking for
replace? This is what I have. I put the code in an unbound text box. What
am I doing wrong? Thanks.

=replace([Description], ". ", "." & Chr(13) & Chr(10))

"krissco" wrote:

On Jul 12, 7:56 am, rml wrote:
How can I make a field break to a new line?

Example: This is a test to see the break. This is the next line.

I would like it to appear like this in my field:

This is a test to see the break.
This is the next line.

I would like it to break on a "period" and eliminate the two spaces after
the "period" and goto the next line.

Thanks.


You can change the control source for the text field to the following:
Currently: [testString]
Change To: =replace([testString], ". ", "." & Chr(13) & Chr(10))

Two caveats:
1. Replace testString with the field name that holds your data.
2. Make sure the control has a different name than the field name.

-Kris


  #4  
Old July 13th, 2007, 04:50 PM posted to microsoft.public.access.reports
krissco
external usenet poster
 
Posts: 167
Default Line Break with condition

On Jul 13, 2:22 am, rml wrote:
The field name the holds the data is "Description" I followed your
instructions but get an error when I open the report? It's looking for
replace? This is what I have. I put the code in an unbound text box. What
am I doing wrong? Thanks.

=replace([Description], ". ", "." & Chr(13) & Chr(10))



It looks good to me. Check your references (ALT+F11 - Tools -
References) and see if there are any missing. You may want to refresh
your references too (unselect one, exit, go back and reselect it,
exit, etc.) and see if that helps.

-Kris

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.