Page 1 of 1

How to populate a Combobox

Posted: 01 Sep 2011, 08:21
by bgygi
Hi, I just downloaded your Combobox, which I am using in VB6. However, I am not clear how to populate the Combobox. The AddItem method doesn't seem to work with your control, and looking through the documentation I can't see what replaces it. I am trying to populate a Combobo with values from an Access table.

Thanks!

Brian

Re: How to populate a Combobox

Posted: 01 Sep 2011, 08:25
by TiKu
Hi,

the setup contains a couple of samples which also add items to the ComboBox.
The replacement for ComboBox.AddItem is ComboBox.ComboItems.Add.

Regards
TiKu

Re: How to populate a Combobox

Posted: 03 Sep 2011, 00:29
by bgygi
OK< that worked, thanks!

I have another question: is it possible to enable the KeyPress event on Command Buttons? I see there is a flag for disabled events, but I'm not sure how to change it to allow Keypress events

Thanks again!

Re: How to populate a Combobox

Posted: 03 Sep 2011, 07:43
by TiKu
Select the command button in the Form designer, click it with the right mouse button and select "Properties...". This opens the control's property pages. To enable the keyboard events, remove the checkmark from the entry "Keyboard events" and click the "Apply" button.