PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

ComboBox (using Commas)

 
 
srm
Guest
Posts: n/a
 
      1st Sep 2009
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
 
Reply With Quote
 
 
 
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      1st Sep 2009
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, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"srm" <(E-Mail Removed)> wrote in message
news:3d96ff92-e3e6-432b-8ab5-(E-Mail Removed)...
> 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



 
Reply With Quote
 
srm
Guest
Posts: n/a
 
      1st Sep 2009
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, Outlook MVP
> * *Author of Microsoft Outlook 2007 Programming:
> * * *Jumpstart for Power Users and Administrators
> * *http://www.outlookcode.com/article.aspx?id=54
>
> "srm" <s...@primatech.com> wrote in message
>
> news:3d96ff92-e3e6-432b-8ab5-(E-Mail Removed)...
>
> > 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
 
Reply With Quote
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      1st Sep 2009
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, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"srm" <(E-Mail Removed)> wrote in message
news:99794827-deb2-4e7f-a664-(E-Mail Removed)...
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-(E-Mail Removed)...
>
> > 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


 
Reply With Quote
 
srm
Guest
Posts: n/a
 
      2nd Sep 2009
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, Outlook MVP
> * *Author of Microsoft Outlook 2007 Programming:
> * * *Jumpstart for Power Users and Administrators
> * *http://www.outlookcode.com/article.aspx?id=54
>
> "srm" <s...@primatech.com> wrote in message
>
> news:99794827-deb2-4e7f-a664-(E-Mail Removed)...
> 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-(E-Mail Removed)...

>
> > > 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Problem: Combobox.setfocus fires combobox.OnClick event Hal Levy Microsoft Access Form Coding 5 31st Jul 2009 03:54 AM
Howto make Combobox requery based on dependant combobox values Shane Microsoft Access Form Coding 1 22nd Apr 2008 09:14 AM
Combobox changes the decimal commas to dots - How to prevent it? =?Utf-8?B?RXJra2E=?= Microsoft Excel Misc 2 23rd Feb 2007 08:20 AM
HowTo? shift focus in VBA IDE between Object combobox, procedure combobox, and Code window Malcolm Cook Microsoft Access 0 11th Oct 2005 03:42 PM
Commas in ComboBox "Possible Values" changed to semicolons =?Utf-8?B?WmFjaDY4?= Microsoft Outlook Form Programming 1 17th Feb 2004 05:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 AM.