ListBox populating with comma separated values

uhadey

New member
Local time
Today, 18:24
Joined
Jul 21, 2011
Messages
7
Hi, I use Access 2003. I am trying to populate a list box with the names of files found in specific folder in my computer. The problem is that if the file name has a comma (,) in it, so the name is being separated in two parts - first what is before a comma and second what is after. I need them exactly as they appear in directory in order to open the files from this list box. What can you suggest?
Thank you.
 
I would surround each of the entries in double quotes (Character 34).

File1,File2,File,3,File4

Would become ...

"File1","File2","File,3","File4"

Access will then treat everything inside the pair of double quotes as a single string. Change your code to something like ...

Code:
strYourFileList = strYourFileList & chr(34) & anotherFilename & chr(34)
 
Thank you so much. It worked perfectly.:D
 

Users who are viewing this thread

Back
Top Bottom