>* this is my table with curstomers >create cursor customers (name c(20), id i) >insert into customers values ('Company One',11) >insert into customers values ('Company Two',12) >insert into customers values ('Company Three',13) >insert into customers values ('Company Four',14) >insert into customers values ('Company Five',15) > >* here is form >frm = createobject('form') > >* here is form's prop to store selected customer id >* NOTE! this property is numeric (as id field is) >frm.addproperty('companyid',0) > >* let's prepare combo box >frm.addobject('cbo','combobox') >with frm.cbo > .top = 100 > .left = 100 > .rowsourcetype = 2 && alias > .rowsource = 'customers' > .boundcolumn = 2 > .boundto = .t. && to store customer id not listindex > .controlsource = 'ThisForm.companyid' && to store selected customer id in forms' property > .visible = .t. >endwith > >messagebox('try to select a customer from a combo!') > >frm.show(1) > >use in customers >>