Line Break with condition

G

Guest

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.
 
K

krissco

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
 
G

Guest

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 said:
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
 
K

krissco

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top