Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access - Query - Carriage return

Status
Not open for further replies.

sellert

Programmer
Nov 18, 2004
36
US
I have a query that combines remarks from different tables for a report. I want it to do a carriage return for each type of remark. Is there a way to do this in the query, or is it only possible in the report? I have tried chr(13) and vbcrlf, with no success.

Thanks,
SELLERT

If I'm not learning I must be coasting. If I am coasting I must be going down hill.
 
You need carriage return, line feed:

[tt] (Chr(13)+Chr(10))[/tt]
 
vbcrlf is both 10 and 13...

try putting in 2 vbcrlfs

--------------------
Procrastinate Now!
 
Crowley16
In my version of Access (2000), it is not possible to use vbCrLf in queries.
 
it must be available from 02 onwards then...

--------------------
Procrastinate Now!
 
How are ya sellert . . .

Have you tried:
Code:
[blue]Remark1 & [purple][b]Chr(13) & Chr(10)[/b][/purple] & Remark2[/blue]

Calvin.gif
See Ya! . . . . . .
 
TheAceMan1

Perhaps you did not see my post dated 26 Mar 07 18:27 ?


 
Crowley16

vbCrLf is a VB constant, and thus not available in a query.

If I make a query like the following in Access2003
Code:
SELECT Code, Desc, [Code] & vbCrLf & [Desc] AS CodeDesc
FROM Codes

I will be prompted to enter the "vbCrLf" value.




 
This would be access 97, it won't allow vbcrlf, or ASCII codes.

Thanks,
SELLERT

If I'm not learning I must be coasting. If I am coasting I must be going down hill.
 
sellert . . .

Post the quetry! . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Woops! . . . post the query!

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top