Hi all expertise, I need your help!
currently i have a combo box which load a huge record for additem, this will make the process slow when I add every item for my combo box drapdown list.
my code is here
im COn as New ADODB.CONNECTION
Dim Rsc as New ADODB.RECORDSET
Con.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=SQLTABLE;Data Source=SQLSERVER"
Rsc.ActiveConnection = Con.ConnectionString
Rsc.Open "Select item_no from item_sql order by item_no asc", , adOpenStatic, adLockOptimistic
comboItemFrom.Clear
comboItemTo.Clear
MaxREC = 0
Do While Not Rsc.EOF
comboItemFrom.AddItem Rsc.Fields("item_no"
comboItemTo.AddItem Rsc.Fields("item_no"
Rsc.MoveNext
MaxREC = MaxREC + 1
Loop
Rsc.Close
MaxREC = MaxREC - 1
comboItemFrom.Text = comboItemFrom.List(0)
comboItemTo.Text = comboItemTo.List(MaxREC)
Can I use combo box when drapdown it will popup a datagrid control ot flexgrid control interms of using this method for the user to select thier records?
currently i have a combo box which load a huge record for additem, this will make the process slow when I add every item for my combo box drapdown list.
my code is here
Dim Rsc as New ADODB.RECORDSET
Con.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=SQLTABLE;Data Source=SQLSERVER"
Rsc.ActiveConnection = Con.ConnectionString
Rsc.Open "Select item_no from item_sql order by item_no asc", , adOpenStatic, adLockOptimistic
comboItemFrom.Clear
comboItemTo.Clear
MaxREC = 0
Do While Not Rsc.EOF
comboItemFrom.AddItem Rsc.Fields("item_no"
comboItemTo.AddItem Rsc.Fields("item_no"
Rsc.MoveNext
MaxREC = MaxREC + 1
Loop
Rsc.Close
MaxREC = MaxREC - 1
comboItemFrom.Text = comboItemFrom.List(0)
comboItemTo.Text = comboItemTo.List(MaxREC)
Can I use combo box when drapdown it will popup a datagrid control ot flexgrid control interms of using this method for the user to select thier records?