Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't assign an Array to Combo Rowsource
Message
 
 
To
20/10/2003 11:22:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00840309
Message ID:
00840310
Views:
23
You've to assign an array name to the RowSource. Try
Thisform.popattached.RowSource = "parray"
>this can't be rocket science and I'm sure I've done it elsewhere but I can't seem to find a working example. The following code appears to work, but I'm not seeing anything in the popup:
>
>attachfile=Getfile()
>If Empty(Thisform.popattached.RowSource)
>	Public Array parray(1)
>Else
>	Dimension parray(Alen(parray)+1)
>Endif
>
>If Not Empty(attachfile)
>	If Empty(parray(Alen(parray)))
>		parray(Alen(parray))=attachfile
>	Endif
>Endif
>If Empty(Thisform.popattached.RowSource)
>	Thisform.popattached.RowSource=parray
>	Thisform.popattached.RowSourceType= 5
>Endif
>
>Thisform.popattached.Requery
>Thisform.Refresh
>I can see all the values being properly assigned and stored in the array. The value of the rowsource is confusing me. Instead of showing "parray" the name of the array that I've assigned to rowsource, I'm getting the first row of the array only.
>
>Presumably I'm doing something stupid and I would welcome someone putting me out of my misery.
>
>Thanks
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform