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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Soft Carriage Return
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? |
#2
|
|||
|
|||
Soft Carriage Return
Scott wrote:
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. -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Soft Carriage Return
Scott -
Try just the line feed Chr$(10) without the carriage return Chr$(13). -- Daryl S "Scott" wrote: 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? |
#4
|
|||
|
|||
Soft Carriage Return
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" wrote: 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? |
#5
|
|||
|
|||
Soft Carriage Return
Neither Chr$(10) by itself or Chr$(13) by itself works. Thanks for trying
and I would appreciate any other ideas. "KARL DEWEY" wrote: 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" wrote: 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? |
#6
|
|||
|
|||
Soft Carriage Return
"Marshall Barton" wrote: Scott wrote: 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. -- Marsh MVP [MS Access] . It is Chr$(11). Got it from the Word side of the house. |
#7
|
|||
|
|||
Soft Carriage Return
Scott wrote:
"Marshall Barton" wrote: Scott wrote: 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 ;-| -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|