Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populate combobox
Message
 
 
À
20/12/2001 18:54:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00597089
Message ID:
00597094
Vues:
20
Hi Inge,

You can use SQL Select as a RowSource by setting following properties
RowSourceType=3 - Sql Select
RowSource="SELECT descr FROM myTable INTO CURSOR crscmbBox"
>What is the best practice to populate a combobox in a form class?
>I had been using a SQL select statement into array:
>
>SELECT descr FROM myTable INTO ARRAY aArray
>THISFORM.cmbBox.RowSourceType=5
>THISFORM.cmbBox.RowSource='aArray'
>USE IN _myTable
>
>Is there a better way?
>I'd like to put the above code in THISFORM.cmbBox.Init().
>But cannot seem to work right. cmbBox comes up with empty list.
>Maybe because aArray is not scoped accross the form class?
>Where do I need to declare aArray?
>Do you think it does not work because aArray is in cmbBox.Init() & lost its value once the Init() process is done?
>
>Thank you all!
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform