I'm loading a client list into a combo box and ordering by client name, this means that the client ID field is not in order.
I can add the names into the list no problem, but can't set the index property as the client id. I receive the error "InvalidArgument=Value of '19' is not valid for 'index'."
I assume index has to run consecutively and can't be set out of order
Is there a way round this. I know this was possible VB6
On Click of Combo would be
value would be 55
I can add the names into the list no problem, but can't set the index property as the client id. I receive the error "InvalidArgument=Value of '19' is not valid for 'index'."
Code:
cboClients.Items.Insert(index,"Client Name")
Is there a way round this. I know this was possible VB6
Code:
cboClients.AddItem "Client Name"
cboClients.ItemData(cboClients.NewIndex) = 55
Code:
value = cboClients.ItemData(cboClients.ListIndex)