General information
Category:
Coding, syntax & commands
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only