Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box
Message
De
14/10/2001 06:31:12
 
 
À
14/10/2001 06:00:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00568259
Message ID:
00568266
Vues:
25
>I have a table index on "Clients.Name" and I have a combo Box to select Clients, I want the table be displayed in Alfabethic order in the combo Box. How to do that?

Carlos Lima, your name seems to be Portuguese, and Mindelo is a locality near my home place (Porto - Portugal) but the flag...

Anyway, about the question you have:

The more practical way to do that is the following:

* On the form load method create the SQL statement that follows
SELECT a.name, a.clientno FROM clients a ORDER BY a.name INTO CURSOR cursor_name

* Define the following combo properties
combo1.controlsource = 'orders.clientno' && Assuming that you have a table
&& named orders and the field you want
&& to define is one called clientno
&& but it could be a memory variable
&& or a form user defined property
combo1.rowsourcetype = 2 && 2 = table or cursor alias
combo1.rowsource = 'cursor_name'
combo1.style = 2 && dropdown list
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform