Solved

New Lines in a memo field

Posted on 2008-06-18
6
444 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now