combobox.items question

  • Thread starter Thread starter Tonya
  • Start date Start date
T

Tonya

Hi,

I want to write code that will fill my combobox ONLY IF it
is currently empty. i need this code to run for the
combobox1.selectedindexchanged event. i wanted to know how
i can code this.
I have tried the following

if combobox1.items.count = 0 then
'run the code to add items to the combobox1
.....
.....
end if

i already have code to fill the combobox from my database
(this works fine), i am just not sure on to find out if
the combobox is currently empty so i know whether to run
this code or not.

thx in advance
 
Hi Tonya,
I want to write code that will fill my combobox ONLY IF it
is currently empty. i need this code to run for the
combobox1.selectedindexchanged event. i wanted to know how
i can code this.
I have tried the following

if combobox1.items.count = 0 then
'run the code to add items to the combobox1
.....
.....
end if

i already have code to fill the combobox from my database
(this works fine), i am just not sure on to find out if
the combobox is currently empty so i know whether to run
this code or not.

Your code should work ... or did you have any problems with it?

Regards,
 
Back
Top