In my Customer profile form, i have this Combobox2 where i add items using the following code and have set the Auto Complete source to list items.
Now whenever i open Customer profile form, it takes around 5-8 seconds to load all the names. How can i do this faster ?Code:Private Sub newCust_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load wrs.Open("select name from customer order by cuid", Module1.db, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic) While Not wrs.EOF ComboBox2.Items.Add(wrs.Fields!name.Value) wrs.MoveNext() End While wrs.Close() End Sub




Reply With Quote