Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keep commas in text?

Status
Not open for further replies.

Cineno

Programmer
Jul 24, 2006
142
US
Hello,

I have a combo box that is populated with values from a table. Sometimes a value will have a comma in it, so the box treats the value as two values and lists what was before and after the commas as two separate values.

I'm thinking about having a module do a replace function on all of these values so that they can still have the commas, but not be treated as different values.

For example if the value's name is Dept, I want to do:
Dept = Replace(Dept, ",", "***")

But what should the *** be so I can still have a comma?

Thanks!
 
You mention values? Does that mean you are using a Value List, rather than data directly from the table? If so, can you enclose the data in quotes:

[tt]List = List & "," & Chr(34) & Data & Chr(34)[/tt]
 
No I'm using data straight from the table. Is there anything else I can do?
 
I do not think this should be happening with data from a table or query, I have not seen it before. Does this happen with all combos?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top