Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listing the contents of a memo field in a combobox
Message
De
29/06/2001 13:55:32
 
 
À
29/06/2001 13:20:46
Robert Herrmann
Tx Dept. of Health - Cancer Registry
Austin, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00525262
Message ID:
00525296
Vues:
13
>Question.. I have 3 tables I am putting into 3 dif. comboboxes.. they all have memo fields in the tables. Unfortunately, the data in the memo fields is what I need displayed in the dropdown combobox. when I just select it in properties for rowsource = 6 the combobox listing just says "memo" and not the actual info in the memo. Anyway I can set it up so that the combobox will list the information in the memo field?
>
>TIA

Hi Robert,

If you know the width of each line of the memo field. You could try the following to get the info from the field into an array. Then use the array to populate the combobox.

THISFORM.yourcombo.ROWSOURCE = ""
* This will hold the number of rows in the meo field
ntemplines = MEMLINES(memofield)
* Set the desire row with
SET MEMOWIDTH TO 'your desired width'
* Loop through all the rows
FOR nlinecntr = 1 TO ntemplines
* Store the contents of the row into this variable
ctempstr = MLINE(memofield,nlinecntr)
* Redimention the array to hold an other element.
DIMENSION yourarray(nlinecntr)
* Populate the array element.
yourarray(nlinecntr) = ALLTRIM(ctempstr)
ENDFOR
* Bind the array
THISFORM.yourcombo.ROWSOURCE = 'yourarray'
* Refresh it's display.
THISFORM.yourcombo.REQUERY

If you require multiple columns. You'll have to sure of the memo field's format.

HTH
Mike
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform