Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box with record source type = array
Message
From
18/07/2000 03:26:30
 
 
To
17/07/2000 22:54:01
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00393629
Message ID:
00393667
Views:
18
Hi E.C.

> I place a code at init method of the form to creat a array eg.
>
>DIME puric(1,1)
>SELECT userid,name FROM users ;
>INTO ARRAY puric
>
>Then at the form, I have a combo box, record source = puric, and source type = array.
>
>The problem is when the form fire 1st time, system give me a error msg the :puric is not an array.
>
>Why?
>
>Thank in advance.

Because the array puric is scoped to the form's Init method. If you require the array to be in scope for other objects on the form, you need to make it a property of the form. To do this, select Form -> New Property from the menu when you are in the form designer. Call the property aPuric[1]. The [1] is required in the property name to make it an array. Then, in the form's init, you can issue the SELECT into ARRY Thisform.apuric. And don't forget to issue a Combo.Requery() after you create the array.

Set the combo's RowSource up as Thisform.aPuric

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform