Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox rowsource of substr
Message
From
14/01/2004 16:48:06
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00866897
Message ID:
00866910
Views:
21
Hi Fred,

Thanks for responding. Yes, I've tried the rowsource type of 2 also. Plus, the code below wasn't actually typed that way in code, I cut it out of the properties window from the rowsource property in designer mode and put it here forgetting to add the quotes because the quotes would only be required in code (like in the init of the form, etc). HOwever, I tried doing it that way too. I used the following in the form init as a test:
DODEFAULT()
thisform.list1.rowsourcetype=2
thisform.list1.rowsource="substr(de_data,62,20),substr(de_data,2,25),ALLTRIM(STR(de_profile))"
thisform.list1.requery()
thisform.list1.refresh()
and I still get the entire field of de_data in column 1 and column 2. I have columncount set to 3 and column widths of 200,200,200 for testing purposes. I'm still at the point of just trying to pull the substring out of the field to begin with let alone make it pretty....
All to no avail so far...

>>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
>
>Do you have your .RowSourceType set to 2, and you need quatation marks around your .RowSource entry:
>
>thisform.list1.rowsource = "substr(master.de_data,62,20), substr(de_data,2,25), de_profile"
>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform