Skip to Content
author's profile photo Former Member
Former Member

Populate a Combo box without adding ‘ValidValues’


Is there anyway to populate a combo box without adding valid values within a loop?
Is there anyway to use Data table for this requirement.

The problem is combo box start to flicking and consuming more time to clear and re populate when using the 'ValidValues.Add()'

Your helps and thoughts are really appreciated.

Best Regards,
J S L Geeganage

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on May 14, 2015 at 09:06 PM

    Hi Jeewan,

    Are you populating a combo on a user form or a system form? Also, are you populating this as the form is opening or is this something that happens when the user is working in the screen?

    The quickest way to populate a combo is via XML, using the LoadBatchActions method of the Application object. If your valid values are coming from the database, you can insert this information in to the XML string at runtime, before you call the LoadBatchActions method.

    Unfortunately, LoadBatchActions can only create new items so it can't be used to repopulate your combo if the valid values need to change due to user interaction. If there are a large number of valid values, consider doing a lookup screen (ie something like a ChooseFromList) instead as this will probably give a more responsive solution.

    Kind Regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Owen,

      Thank you very much for the reply. The combo box is on a user form and that needs to repopulate due to user interactions.

      Yes there can be many items to populate and clear when user make another selection. So as you mentioned I would be better to go with a lookup screen.

      So, making it clear once more, If we need to add and remove values to the combo at runtime with user interaction, is the only possible way is the 'ValidValues'?

      Thanks again for the help Owen.

      Kind Regards,

      J S L Geeganage

  • Posted on May 15, 2015 at 01:01 AM

    Hi Jeewan,

    a Form.Freeze() will usually enough to do the trick.

    But if your Valid Values are too many, as suggested by @Owen Slater, consider using CFL or even a formatted search.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.