NigelRocks
asked on
Problem with AddItem
Experts,
I'm attempting something that should be very simple, but is turning out not to be. Here's the line that works:
cboSolutions.AddItem rsCase("Solution_Descripti on")
where "Solution_Description" is a large string. cboSolutions. is a standard combo box.
I've decided I want to add the ID in to the index field of the combo with each string entry, so I tried:
cboSolutions.AddItem rsCase("Solution_Descripti on"), rsCase("Solution_ID")
where "Solution_ID" is an integer. It didn't like this at all. I expermented by putting a straight integer in the second field, and by putting a string literal in the first field after that.
What am I missing?
I'm attempting something that should be very simple, but is turning out not to be. Here's the line that works:
cboSolutions.AddItem rsCase("Solution_Descripti
where "Solution_Description" is a large string. cboSolutions. is a standard combo box.
I've decided I want to add the ID in to the index field of the combo with each string entry, so I tried:
cboSolutions.AddItem rsCase("Solution_Descripti
where "Solution_ID" is an integer. It didn't like this at all. I expermented by putting a straight integer in the second field, and by putting a string literal in the first field after that.
What am I missing?
The second parameter specifies an existing position in the list, so must not equal or exceed the number of items.
ASKER
Where do you get the "NewIndex" variable?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
cboSolutions.AddItem rsCase("Solution_Descripti
cboSolutions.ItemData(NewI