View Full Version : Update Queries and Carriage Returns


Maestro
03-19-2002, 03:32 PM
When I run an update query to update one table in my database with information from another table I'm getting problems with a field for an address. I have my table set up so that addresses are entered into one field rather than separated into several different fields for street/town/county etc. I'd rather not have to change this for all my records if possible!

Problem is, when the query updates the table, it ignores line breaks and replaces them with a box symbol resulting in something like this:

Address Line 1,Address Line 2,Address Line 3, etc.

This looks dreadful when viewed through the form and of course is no good for printing off address labels. I need:

Address Line 1,
Address Line 2,
Address Line 3
etc.

Is there any way around this problem?

SimonC
03-19-2002, 10:49 PM
I think the problem is that just a carriage return character (i.e. Chr$(13)) is being inserted between each "line". To get proper separation so the output appears on multiple lines, both a carriage return and a line feed (Chr$(10)) need to be inserted.

Simon.

mbentley
08-26-2004, 01:00 PM
I was having a similar problem using the Chr() function in a query. Turns out I had to use the Chr$() function instead. Can't find that in the help files. What is it?