I have a combo box that I would like it to show a
category name ("Cat1" , "Cat2"...)
But when clicked or just displayed I would like to get the ID of this category. Any idea how to do this in Foxpro?
To populate your combobox:
Thisform.Combo1.AddItem("Cat1")
Thisform.Combo1.AddItem("Cat2")
You may use rowsource to add the entire item list into the combobox.
Get the selected value of combobox:
Thisform.Combo1.DisplayValue