ComboBox (using Commas)

Status
Not open for further replies.
S

srm

I'm using O2003, creating a custom form, using the combo box control.

I want to add multiple values but within those values I want to use

commas. For example

This is value number 1, and it has a comma

This is value number 2, and it has a comma

However, Outlook thinks the comma is a new entry and it lists the

items as follows:

This is value number 1

and it has a comma

This is value number 2

and it has a comma

It there a way to add entry using a comma as part of the entry?

Thank you.

Shawn
 
S

Sue Mosher [MVP]

You would need to use code in the form's Item_Open event handler. See

http://www.outlookcode.com/article.aspx?ID=32 for a sample form.

Sue Mosher

"srm" <srm@primatech.com> wrote in message

news:3d96ff92-e3e6-432b-8ab5-5172ccd0ae74@g1g2000vbr.googlegroups.com...
> I'm using O2003, creating a custom form, using the combo box control.
> I want to add multiple values but within those values I want to use
> commas. For example

> This is value number 1, and it has a comma
> This is value number 2, and it has a comma

> However, Outlook thinks the comma is a new entry and it lists the
> items as follows:

> This is value number 1
> and it has a comma
> This is value number 2
> and it has a comma

> It there a way to add entry using a comma as part of the entry?

> Thank you.

> Shawn
 
S

srm

On Sep 1, 11:57 am, "Sue Mosher [MVP]" <sue...@turtleflock.com> wrote:
> You would need to use code in the form's Item_Open event handler. Seehttp://www.outlookcode.com/article.aspx?ID=32for a sample form.
> > Sue Mosher
>    >      >    
> "srm" <s...@primatech.com> wrote in message

> news:3d96ff92-e3e6-432b-8ab5-5172ccd0ae74@g1g2000vbr.googlegroups.com...
>
> > I'm using O2003, creating a custom form, using the combo box control.
> > I want to add multiple values but within those values I want to use
> > commas. For example

>
> > This is value number 1, and it has a comma
> > This is value number 2, and it has a comma

>
> > However, Outlook thinks the comma is a new entry and it lists the
> > items as follows:

>
> > This is value number 1
> > and it has a comma
> > This is value number 2
> > and it has a comma

>
> > It there a way to add entry using a comma as part of the entry?

>
> > Thank you.

>
> > Shawn


Sue:

Thank you. I don't want to take too much of your time. I got this to

appear on a test form in the "General" and "P.2" tab, but not my

custom form "General" or "P.2" tab. I see the drop down, but no data.

I' think I'm past my capability of coding at this point. I still

cannot get it to accept the commas and I'm not a big coder. Am I close

or over my head at this point and need to look at other options?

Function Item_Open()

' Sets the name of page on the form (General)

Set FormPage = Item.GetInspector.ModifiedFormPages("General")

' Sets Control to a combo box called ComboBox1.

Set Control = FormPage.Controls("ComboBox1")

' Assign values to the combo box.

Control.PossibleValues = "Blue;Green;Red;Yellow"

End Function

Shawn
 
S

Sue Mosher [MVP]

You should never use PossibleValues in code. Did you look at the sample form

on the I suggested? It shows exactly how to load rows into a list box or

combo box from a delimited string.

Sue Mosher

"srm" <srm@primatech.com> wrote in message

news:99794827-deb2-4e7f-a664-05f4418a0974@o13g2000vbl.googlegroups.com...

On Sep 1, 11:57 am, "Sue Mosher [MVP]" <sue...@turtleflock.com> wrote:


> You would need to use code in the form's Item_Open event handler.
> Seehttp://www.outlookcode.com/article.aspx?ID=32for a sample form.

> "srm" <s...@primatech.com> wrote in message

> news:3d96ff92-e3e6-432b-8ab5-5172ccd0ae74@g1g2000vbr.googlegroups.com...
>
> > I'm using O2003, creating a custom form, using the combo box control.
> > I want to add multiple values but within those values I want to use
> > commas. For example

>
> > This is value number 1, and it has a comma
> > This is value number 2, and it has a comma

>
> > However, Outlook thinks the comma is a new entry and it lists the
> > items as follows:

>
> > This is value number 1
> > and it has a comma
> > This is value number 2
> > and it has a comma

>
> > It there a way to add entry using a comma as part of the entry?

>
> > Thank you.

>
> > Shawn


Sue:

Thank you. I don't want to take too much of your time. I got this to

appear on a test form in the "General" and "P.2" tab, but not my

custom form "General" or "P.2" tab. I see the drop down, but no data.

I' think I'm past my capability of coding at this point. I still

cannot get it to accept the commas and I'm not a big coder. Am I close

or over my head at this point and need to look at other options?

Function Item_Open()

' Sets the name of page on the form (General)

Set FormPage = Item.GetInspector.ModifiedFormPages("General")

' Sets Control to a combo box called ComboBox1.

Set Control = FormPage.Controls("ComboBox1")

' Assign values to the combo box.

Control.PossibleValues = "Blue;Green;Red;Yellow"

End Function

Shawn
 
S

srm

On Sep 1, 2:00 pm, "Sue Mosher [MVP]" <sue...@turtleflock.com> wrote:
> You should never use PossibleValues in code. Did you look at the sample form
> on the I suggested? It shows exactly how to load rows into a list box or
> combo box from a delimited string.
> > Sue Mosher
>    >      >    
> "srm" <s...@primatech.com> wrote in message

> news:99794827-deb2-4e7f-a664-05f4418a0974@o13g2000vbl.googlegroups.com...
> On Sep 1, 11:57 am, "Sue Mosher [MVP]" <sue...@turtleflock.com> wrote:

>
> > You would need to use code in the form's Item_Open event handler.
> > Seehttp://www.outlookcode.com/article.aspx?ID=32fora sample form.

>
> > "srm" <s...@primatech.com> wrote in message

>
> >news:3d96ff92-e3e6-432b-8ab5-5172ccd0ae74@g1g2000vbr.googlegroups.com...

>
> > > I'm using O2003, creating a custom form, using the combo box control.
> > > I want to add multiple values but within those values I want to use
> > > commas. For example

>
> > > This is value number 1, and it has a comma
> > > This is value number 2, and it has a comma

>
> > > However, Outlook thinks the comma is a new entry and it lists the
> > > items as follows:

>
> > > This is value number 1
> > > and it has a comma
> > > This is value number 2
> > > and it has a comma

>
> > > It there a way to add entry using a comma as part of the entry?

>
> > > Thank you.

>
> > > Shawn


> Sue:

> Thank you. I don't want to take too much of your time. I got this to
> appear on a test form in the "General" and "P.2" tab, but not my
> custom form "General" or "P.2" tab. I see the drop down, but no data.
> I' think I'm past my capability of coding at this point. I still
> cannot get it to accept the commas and I'm not a big coder. Am I close
> or over my head at this point and need to look at other options?

> Function Item_Open()

>    ' Sets the name of page on the form (General)
>    Set FormPage = Item.GetInspector.ModifiedFormPages("General")

>    ' Sets Control to a combo box called ComboBox1.
>    Set Control = FormPage.Controls("ComboBox1")

>    ' Assign values to the combo box.
>    Control.PossibleValues = "Blue;Green;Red;Yellow"

> End Function

> Shawn


Sue:

Thank you. I will check the page again. I appreciate your time.

Shawn
 
Status
Not open for further replies.
Top