We have a combobox class which has rowsourcetype of 5-array, rowsource of
this.iatableentries and style dropdownlist. Bound column is 2 because the
array (created in the init) has 2 columns, the first being the id and the
second being the associated text.
This class works perfectly on all our standard forms where the controlsource
is set to a table's fieldname. On a form where the controlsource is set to a
form property, no initial value is displayed even though the form property
has the correct value in it when you look at it in debug. The listindex
property is 0 for some reason. We've tried calling the combobox refresh and
requery to no avail. Can anyone tell me why the listindex property is 0 as
that seems to be the root of the problem.

Thanks for any help,

Bernie

Re: vfp8 combobox misbehaving by Eugene

Eugene
Mon Oct 10 19:32:17 CDT 2005

Bernie Beattie wrote:
> We have a combobox class which has rowsourcetype of 5-array, rowsource of
> this.iatableentries and style dropdownlist. Bound column is 2 because the
> array (created in the init) has 2 columns, the first being the id and the
> second being the associated text.
> This class works perfectly on all our standard forms where the controlsource
> is set to a table's fieldname. On a form where the controlsource is set to a
> form property, no initial value is displayed even though the form property
> has the correct value in it when you look at it in debug. The listindex
> property is 0 for some reason. We've tried calling the combobox refresh and
> requery to no avail. Can anyone tell me why the listindex property is 0 as
> that seems to be the root of the problem.
>
> Thanks for any help,
>
> Bernie

try putting thisform.listbox1.listindex = 1 in the forms Init() method.