I am attempting to move a value in one list box to another. The problem is is that the value contains a comma in it. It's a chemical database so removing the comma is out of the question. Any suggestions?
randaj,
There is a Replace Function that will let you replace all of the commas with asterisks, or whatever, then when you get it where you want it, just use the function to replace the asterisks with commas. At least that's what I did in a similar situation.
I don't understand why you would lose the comma during the move process. Exactly what is the data being moved? A string, large integer, etc. Give an example.
Bob Scriver
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???
I'm not loosing any data. The problem is is when I move the chemical name from one list box to the other, the comma makes the second list box think its receiving two values instead of one. For example:
List Box A - 1,10 Dimetholone
List Box B - 1
10 Dimentholane
Try surrounding the selection with quotes. The following is what I used to add a pick from one listbox to the value list row source of the second listbox:
Me![List2].RowSource = Me![List2].RowSource & "; '" & Me![List1] & "'"
The pick for List1 was your example: 1,10 Dimetholone
By surrounding the text selection with single quotes it does not try to interpret the comma as a value list seperator.
Let me know if this works in your situation.
Bob Scriver
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.