If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Carriage return in text box.
Greetings all. I have a form with the record source being a view from SQL
Server. There is a notes field with notes separated by a carriage return. The access form field only displays the little square box between the notes representing the carriage return. However, if I open the SQL Server view in Excel, and format the column as wrap text, the notes do indeed display in the desired format, which is to have one note per line in the field. Is there a way to get an Access 2003 text box to display the carriage returns? In the text, the notes are displayed like this, and let the brackets represent the carriage return character...02/24/2010: Test note 3[]02/24/2010: Test note2[] 02/24/2010: Test note. However, if I copy the text box and paste it here, it is property displayed as below... 02/24/2010: Test note 3. 02/24/2010: Test note 2. 02/24/2010: Test note Any ideas? Thank you. Greg -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201002/1 |
#2
|
|||
|
|||
Carriage return in text box.
On Wed, 24 Feb 2010 16:39:25 GMT, gsnidow via AccessMonster.com wrote:
Greetings all. I have a form with the record source being a view from SQL Server. There is a notes field with notes separated by a carriage return. The access form field only displays the little square box between the notes representing the carriage return. However, if I open the SQL Server view in Excel, and format the column as wrap text, the notes do indeed display in the desired format, which is to have one note per line in the field. Is there a way to get an Access 2003 text box to display the carriage returns? In the text, the notes are displayed like this, and let the brackets represent the carriage return character...02/24/2010: Test note 3[]02/24/2010: Test note2[] 02/24/2010: Test note. However, if I copy the text box and paste it here, it is property displayed as below... 02/24/2010: Test note 3. 02/24/2010: Test note 2. 02/24/2010: Test note Any ideas? Thank you. Greg Most likely the little square represents a line feed character, not a carriage return character. In Excel, the carriage return/new line is just chr(10) (the line feed character). In Access, the carriage return/new line is chr(13) & chr(10), (a carriage return character and a line space character) in that order. You can run an update query on that field to replace the chr(10) with chr(13) & chr(10). Update YourTable Set YourTable.[FieldName] = Replace([FieldName],chr(10),chr(13) & chr(10)) -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
Carriage return in text box.
Thank you Fred for your help. I actually just altered the function in SQL
Server to add CHAR(10) + CHAR(13). I was quite dismayed when two little squares started showing up. However, as per you post, I reversed the the order(I did not realize it made a difference), and voila, they are displaying correctly now. Thanks again. fredg wrote: Greetings all. I have a form with the record source being a view from SQL Server. There is a notes field with notes separated by a carriage return. [quoted text clipped - 15 lines] Greg Most likely the little square represents a line feed character, not a carriage return character. In Excel, the carriage return/new line is just chr(10) (the line feed character). In Access, the carriage return/new line is chr(13) & chr(10), (a carriage return character and a line space character) in that order. You can run an update query on that field to replace the chr(10) with chr(13) & chr(10). Update YourTable Set YourTable.[FieldName] = Replace([FieldName],chr(10),chr(13) & chr(10)) -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201002/1 |
Thread Tools | |
Display Modes | |
|
|