Solved

New Lines in a memo field

Posted on 2008-06-18
6
454 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

863 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

25 Experts available now in Live!

Get 1:1 Help Now