>Hi,
>
>This might be an easy one. I have a combo box on a form. The RowSourceType is set to SQL statement. The SQL statement is something like 'select * from sometable into mycursor' The resulting cursor has two fields for each record. Field1 is the primary key, field2 is a description. Is there a way I can have the combobox.value=field1, but the text displayed when you click the combobox to be from field2? Right now I have the columncount = 2 so you see both. But I would like the users to be only be able to see the description as the key means nothing to them. (but i need it for other code on the form)
>
>Thanks,
>Chris
Chris,
Put your display field (field2) in front. Something like this :
.RowsourceType = 3
.Rowsource = 'select field2, field1 from myTbale into cursor crsCombo'
.Columncount = 2
.BoundColumn = 2
.ColumnWidths = '100,0' && 2nd never displayed
.ControlSource = 'sometable.somefield'
Cetin