Forum Discussion

apease01's avatar
apease01
Occasional Contributor
14 years ago

How do I list contents of a table in a combobox within a Userform?

Hi,



I am new to TestComplete and have little knowledge of programing.



I have created a table and need to link this table to a combo box within a Userform.



Thanks in advance,

Andy

3 Replies

  • Hi,



    What exact table do your mean and how should it be linked to a combo box? Can you describe your request in detail?
  • apease01's avatar
    apease01
    Occasional Contributor
    Hi Jared,



    What I am trying to do is search a folder for a file, open that file and search for a specific word. However the folder which I need to search depends on what application I am testing, all the rest of the test will be the same.



    I have created a form with a Combobox in, and also created a table that pulls back all folders names within a specific location. What I need is the combobox to show all folders listed in table, when a folder is selected open that folder and run the search script.



    Any help or suggestions you have would be greatly appreciated,



    Regards,

    Andy
  • Hi Andy,



    You can iterate through records in your table and add them to a combo box one by one by using its Properties.Items.Add method. To fill the combo box, write code which will do this in the form's OnShow event handler (see the "UserForm.OnShow" help topic).