Hi
I use the following code to populate a combobox is it possible to
sort the list before I index.
I use the following code to populate a combobox is it possible to
sort the list before I index.
Code:
'Load Combo Data
With frmTopControl
If Control.myRset.RecordCount > 0 Then
Set .dgCombo.DataSource = Control.myRset
.dgCombo.Columns(0).Width = 2000
Me.cboCodes.Text = "Country List"
Do While Not Control.myRset.EOF
strCombo(i) = .dgCombo.Columns(0)
Control.myRset.MoveNext
Me.cboCodes.AddItem strCombo(i), i
'stop UK from being Deleted or Edited
If strCombo(i) = "United Kingdom" Then cboCodes.ItemData(cboCodes.NewIndex) = 1001
i = i + 1
Loop
End If