Solved

Displaying field that contains multi line

Posted on 2011-09-13
5
313 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

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

Suggested Solutions

Title # Comments Views Activity
Attachment field in SQL 3 28
Access Update Query 1 20
Calculation in Access 5 26
is Microsoft Access going to Die? 9 46
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

770 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