Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox rowsource of substr
Message
 
À
14/01/2004 16:05:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00866897
Message ID:
00866922
Vues:
23
Hi Tracy,

If your table is not too large (which I assume it isn't since you decided to use a listbox), maybe this would work:
SELECT ;
	substr(de_data,62,20) AS x2, ;
	substr(de_data,2,25) AS x1, ;
	de_profile AS x3 FROM yourTable INTO CURSOR _xListbox
Then, you'll be able to use the cursor as the RowSource for your listbox. Or, you want to SELECT - SQL into an array and use the array as the RowSource.

HTH


>I am converting a FPD26 screen that used to popup a browse window in DOS. I have created a listbox to hold the values on the form but the problem I am running into is how to get the listbox to recognize the values. Right now it stuffs the columns using SUBSTR() with the entire contents of the field de_data. Here is my new code:
>
>
>thisform.list1.rowsource = substr(master.de_data,62,20), substr(de_data,2,25), de_profile
>
>two of the colums are a substr of the field. I have tried using a rowsourcetype of 6 - fields to no avail. Anyway to do this?
>
>Here is the original FPD26 code:
>
>BROWSE FIELDS ;
>	x2 = substr(de_data,62,20) :H="License#", ;
>	x1 = substr(de_data,2,25) :H="Name", ;
>	x3 = de_profile :H="System ID" ;
>	FREEZE x2 ;
>
>
>TIA!
>Tracy
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform