>Hi all,
>
>one of my drop down list (combol box) need to show information from a array named arrClass.
>My code:
>.rowsource='arrClass'
>.displayvalue=arrClass(0)
>..
>but the value cann't be displayed. Can someone please give me an example how to use array to display value in a drop down list?
>
>Linda
Hi Linda,
You should have something like that:
.rowsourcetype = 5
.rowsource = 'arrClass'
.Requery()
.Refresh()
.Listindex = 1
You cannot specify something like .displayvalue=arrClass(0) as arrays in VFP are not zero-based and always start with 1
Also, basically what is shown in combo depends on what your column Controlsource is and what that record value is. If the value is not in array the combo may just show nothing.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison