Solved

Displaying field that contains multi line

Posted on 2011-09-13
5
314 Views
Last Modified: 2012-05-12
Hi,
I have a simple web interface where administrators can add customer data.  From the browser, admin will enter several info. The address field will sometimes have several lines, e.g.

No 3, BLOCK A,
PRIMA SQUARE.

I'm using the DevExpress Gridview to achieve this goal, and from the web page, the lines are recognized.

However, some of our backoffice users use a MS Access interface to generate invoices, etc.  When the address was entered from the web page, the carriage returns don't seem to follow through.

I can't do a replace in MS Access because i'm not sure what to look for. I know the characters are hidden in the text somewhere, because exporting from the access table to excel shows the fields with multi lines.

I'm attaching some screenshots of the different views.

Any ideas?

Thanks.
access-report.JPG
fromWebpage.JPG
exportedFromAccessTableToExcel.JPG
notepadplus.JPG
0
Comment
Question by:GCCTECHIE
  • 2
  • 2
5 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 36528017
Access requires Chr(13) & chr(10) for a new line.

Obviously I don't know what your source data uses.
0
 

Author Comment

by:GCCTECHIE
ID: 36528170
hi,
i'm not sure what it uses, since i can't see it.

i'm attaching the db, if it can be of any help.
AccessInterface.mdb
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 36528334
Excel uses CHR(10) for newlines....

Make a backup of your data and try this update query to replace Chr(10) with Chr(13) & Chr(10):

UPDATE CUSTOMER
SET Address =  Replace([Address],Chr(10),Chr(13) & Chr(10))

Open in new window


This worked for me in your sample.
0
 

Author Closing Comment

by:GCCTECHIE
ID: 36533801
Hi mbizup,

thanks...that solution worked for me.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 36533859
Glad that worked out :-)
0

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run an action on recently added records to a table 13 60
Random times with 12/24 hour switching 9 27
IIF in access query 19 24
troubleshoot a python script 8 20
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
A short article about problems I had with the new location API and permissions in Marshmallow
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 …

840 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