How to Refresh combobox in Visual Basic
Posted
by
phenomenon09
on Stack Overflow
See other posts from Stack Overflow
or by phenomenon09
Published on 2013-10-28T08:29:54Z
Indexed on
2013/10/28
21:54 UTC
Read the original article
Hit count: 154
When a button is clicked, it populates a combo box with all the databases you have created. Another button creates a new database. How do I refresh my combobox to add the newly added database?
Here's how I populate my combo box at the start:
rs.Open "show databases", conn
While Not rs.EOF
If rs!Database <> "information_schema" Then
Combo1.AddItem rs!Database
End If
rs.MoveNext
Wend
cmdOK.Enabled = False
cmdCancel.Enabled = False
frmLogin.Height = 3300
rs.Close
© Stack Overflow or respective owner