Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

Refreshing a Combo Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve C - 21 Apr 2005 15:00 GMT
I have a user form with two combo boxes.  In ComboBox1, the user selects a
Division from 1-16. Based on that selection, ComboBox2 is then populated with
the appropriate corresponding choices.  My problem is that if the user
chooses Division 3 for example, then changes his mind and selects Division 7
(before closing the form), ComboBox2 then populates with choices for both
Division 3 and 7.  Is there a command for refreshing ComboBox2 upon changing
ComboBox1 so that it only displays the selected division?  Thanks.

Steve C
Jay Freedman - 21 Apr 2005 16:17 GMT
> I have a user form with two combo boxes.  In ComboBox1, the user
> selects a Division from 1-16. Based on that selection, ComboBox2 is
[quoted text clipped - 6 lines]
>
> Steve C

Hi Steve,

In the code (ComboBox1_Change()?) that loads items into ComboBox2, the first
statement should be

  ComboBox2.Clear

That will delete all the choices currently in the list, and the code will
then start adding items to an empty list.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

Steve C - 21 Apr 2005 17:39 GMT
Thank you, Jay! (or should I call you Obi-Wan?)

Steve C (not quite the programming jedi yet)

> > I have a user form with two combo boxes.  In ComboBox1, the user
> > selects a Division from 1-16. Based on that selection, ComboBox2 is
[quoted text clipped - 16 lines]
> That will delete all the choices currently in the list, and the code will
> then start adding items to an empty list.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.