Soft Carriage Return

S

Scott

I have a Word document that gets address data from a query in a database. If
the query has a hard return [Chr$(13) + Chr$(10)], the address does not line
up properly in the Word document. If I manually enter a soft return (Shift +
Enter) the address lines up properly. How can I put in a soft return in the
query?
 
M

Marshall Barton

Scott said:
I have a Word document that gets address data from a query in a database. If
the query has a hard return [Chr$(13) + Chr$(10)], the address does not line
up properly in the Word document. If I manually enter a soft return (Shift +
Enter) the address lines up properly. How can I put in a soft return in the
query?


You have to use Word's new line code. I don't know what
that is, but in Excel, it's just Chr(10), maybe it the same
in Word or maybe it's just Chr(13). Why they are different
in different parts of office is lost in the mists of time.
 
K

KARL DEWEY

I do not know about your database but mine uses CTRL+Enter instead of
SHIFT+Enter.

I just checked ( Asc(Right(Left([MyField],2),1)) CTRL+Enter following
first character) and the character inserted is Chr(13).
 
S

Scott

Neither Chr$(10) by itself or Chr$(13) by itself works. Thanks for trying
and I would appreciate any other ideas.

KARL DEWEY said:
I do not know about your database but mine uses CTRL+Enter instead of
SHIFT+Enter.

I just checked ( Asc(Right(Left([MyField],2),1)) CTRL+Enter following
first character) and the character inserted is Chr(13).


--
Build a little, test a little.


Scott said:
I have a Word document that gets address data from a query in a database. If
the query has a hard return [Chr$(13) + Chr$(10)], the address does not line
up properly in the Word document. If I manually enter a soft return (Shift +
Enter) the address lines up properly. How can I put in a soft return in the
query?
 
S

Scott

Marshall Barton said:
Scott said:
I have a Word document that gets address data from a query in a database. If
the query has a hard return [Chr$(13) + Chr$(10)], the address does not line
up properly in the Word document. If I manually enter a soft return (Shift +
Enter) the address lines up properly. How can I put in a soft return in the
query?


You have to use Word's new line code. I don't know what
that is, but in Excel, it's just Chr(10), maybe it the same
in Word or maybe it's just Chr(13). Why they are different
in different parts of office is lost in the mists of time.
It is Chr$(11). Got it from the Word side of the house.
 
M

Marshall Barton

Scott said:
Marshall Barton said:
Scott said:
I have a Word document that gets address data from a query in a database. If
the query has a hard return [Chr$(13) + Chr$(10)], the address does not line
up properly in the Word document. If I manually enter a soft return (Shift +
Enter) the address lines up properly. How can I put in a soft return in the
query?


You have to use Word's new line code. I don't know what
that is, but in Excel, it's just Chr(10), maybe it the same
in Word or maybe it's just Chr(13). Why they are different
in different parts of office is lost in the mists of time.
It is Chr$(11). Got it from the Word side of the house.


Well, I don't feel too bad about not guessing Word would use
Vertical Tab as the code for a new line ;-|
 

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