Solved

New Lines in a memo field

Posted on 2008-06-18
6
472 Views
Last Modified: 2013-11-27
I'm trying to use a query to write addresses to a memo field in an Access Table.  I want each line of the address to be displayed as a new line in the memo field.  I though I could do this by adding "& chr(13) &" between the address fields but it doesn't work.  When displaying the memo field in a form the address fields are not on seperate lines but rather I see a small square where the new line break should be.  Is there another way to do this?
0
Comment
Question by:dsoderstrom
  • 3
  • 2
6 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 21812952
Not an answer to your question, but you're generally better off storing the components of the address (addr1, addr2, city, state, etc ) as seperate fields.   It facilitates displaying the lines as you need to, and is easier to maintain.
0
 
LVL 10

Accepted Solution

by:
therealmongoose earned 250 total points
ID: 21812954
you need to use chr(13) & chr(10)

This is line feed + carriage return....
0
 
LVL 10

Expert Comment

by:therealmongoose
ID: 21813008
also if you populate the field through a form rather than directly into the table, the memo text field of the form as an Enter key property, which can be set to  "New Line in Field" - there fore accepting returns in your data. PS agree with mbizup - address data better stored in separate fields....
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:dsoderstrom
ID: 21813418
I've also tried using chr(13) and chr(10).  Then I see two small squares instead of one and still don't get a new line.
0
 

Author Closing Comment

by:dsoderstrom
ID: 31468325
I had tried this previously but had Chr(10) before Chr(13) .  When I put them in the right order it works.  Thank You.
0
 
LVL 10

Expert Comment

by:therealmongoose
ID: 21813902
Great - sorry should have specified that you need to use them in that order!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question