"Dirkasaurus" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)
> Does anyone know some type of work around or a variable setting that
> allows MSAccess combos to not treat commas or Semicolons as carriage
> returns?
>
> If the combo gets its data from a MS Table it can handle Commas or
> semi colons, but if it gets it from string values via code that
> MSAccess treats them as carriage returns and breaks of the data
> accorddingly.
Are you talking about setting the combo box's RowSource to a value list?
You have to enclose any values that include commas or semicolons in
quotes. If you're setting the RowSource property on the property sheet,
you could do it as in this example:
Row Source ......... A; "B; C"; "D, E", F
If you're setting the property in code, you need to use quoted strings
*inside* the quoted string literal. Here's an example:
Me.List0.RowSource = "A; 'B; C'; 'D, E', F"
You can also get internal quotes by doubling up the double-quotes:
Me.List0.RowSource = "A; ""B; C""; ""D, E"", F"
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)