Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Combobox's list separator character, not separating correctly

Geek News

Combobox's list separator character, not separating correctly
"Emil" <EMiclaus[ at ]binsky.com> 11/21/2008 4:58:33 PM
HI,

I have a combobox on a form. I set the rowsource for it in code, to a string
of values delimited with ";" character.
The 'Row Source Type' is set to 'Value List' and 'Separator Characters' is
set to ";" on the form and also i set these properties in code to the same
values (acSeparatorCharactersSemiColon for the Separator Characters).
Anyway on the form, in the list of items for this combobox access, does not
separate them correctly.
For example if I have the string "Company_1;Company_2, INC.;Company_3" the
items in the combobox will be:
Company_1
Company_2
INC.
Company_3
So access is considering the "," also as a delimiter, even if I set the
delimiter only to ";"

How can i fix this?
Thank you.


RE: Combobox's list separator character, not separating correctly
Steve Sanford 11/22/2008 3:30:00 AM
Did you try

"Company_1";"Company_2, INC.";"Company_3"

Note the quotes

HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


"Emil" wrote:

[Quoted Text]
> HI,
>
> I have a combobox on a form. I set the rowsource for it in code, to a string
> of values delimited with ";" character.
> The 'Row Source Type' is set to 'Value List' and 'Separator Characters' is
> set to ";" on the form and also i set these properties in code to the same
> values (acSeparatorCharactersSemiColon for the Separator Characters).
> Anyway on the form, in the list of items for this combobox access, does not
> separate them correctly.
> For example if I have the string "Company_1;Company_2, INC.;Company_3" the
> items in the combobox will be:
> Company_1
> Company_2
> INC.
> Company_3
> So access is considering the "," also as a delimiter, even if I set the
> delimiter only to ";"
>
> How can i fix this?
> Thank you.
>
>
>
RE: Combobox's list separator character, not separating correctly
"Linq Adams via AccessMonster.com" <u28780[ at ]uwe> 11/22/2008 3:57:48 PM
Steve is correct, of course; each item should have quotes around it. In point
of fact,

"Company_1;Company_2, INC.;Company_3"

should have resulted in you only having one item in your combobox

Company_1;Company_2, INC.;Company_3

all on one line.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net