Microsoft KB Archive/94109

{|
 * width="100%"|

PRB: Trailing CR/LFs Deleted from Text Box When Data Retrieved
'Article ID: Q94109

Creation Date: 28-DEC-1992

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you retrieve data from a text box, trailing carriage returns and line feeds (CR/LFs) are deleted. Although you can insert CR/LFs into a text box, when you attempt to retrieve the data, they are deleted.

STATUS

This behavior no longer occurs in Microsoft Access version 2.0.

MORE INFORMATION

Steps to Reproduce Behavior

 Open the Customers Form in the sample database NWIND.MDB. Open the Immediate window and position it on the screen so that it and the Customers form are both in view.  Type the following command in the Immediate window: "Forms!Customers.[Contact Name] = &quot;Chris&quot; & chr(13) & chr(10)" At this point, the Contact Name control on the form should be updated and should contain the text &quot;Chris&quot; with a blank line below it. This shows that the CR/LF is in the text box.   Type the following command in the Immediate window: "MyValue = Forms!Customers.[Contact Name]" The variable MyValue contains the text &quot;Chris.&quot; but there is no CR/LF at the end of the text. This can be tested by running the following command from the Immediate window: "Print MyValue & &quot;*&quot;" This returns the value &quot;Chris*&quot; which shows that there is no CR/LF at the end of MyValue. 
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 1.10 strip out eliminate truncate

KBCategory: kbusage

KBSubcategory: FmsHowto