Unanswered: Punctuated text added to list box is split
I need your help in solving why punctuated text gets split and some of it lost when added to a list box. In this instance, two lines are added to the list box instead of one. The split is at the position of the comma. The comma and semi-colon are omitted, all text following the semi-colon does not get into the list box. The code:
Dim txtString As String
txtString = "The cabin looked deserted, and half covered with snow; and it would soon be dark."
A blank database with one form is attached to demonstrate what is happening.
Thank you pootle flump for your response. I am using Access 2003 and maybe that causes your solution of using quotes like this: """text; more text""" to split the text when using AddItem with a list box, as it did for me without the extra quotes. It appears that the Access AddItem method treats the punctuated text as delimited strings separated by commas or semi-colons.
The solution I am using is a temporary table to hold strings of text. This table is the row source for the list box, and now the text appears intact in the list box.