>>In VFP.exe:
>>
>>SET FIELD TO
>>messagebox(Set([Field],1)) && will list all the fields with alias name
>>
>>But in Execute File run in VFP500.DLL:
>>
>>SET FIELD TO
>>messagebox(Set([Field],1)) && will return a word [All]
>
>I never saw this before - because I don't do it that way!!
>
>I use the AFIELDS() function to create an array of fields, and ALIAS() to get the alias of the current workarea.
Thanks, Paul.
Since hiding more than one columns by setting column width to zero make the grid poor in show(Thick black lines) and useless on keyboard {Tab}, I try another method to do.
Set Field to Field1, Field2, Field3...
Where this field list is set by user favour!
Once I set the field list, AFields()
will NOT return the original list.
So, the user
cannot ReChoose the fields list as the list is shorten as previous selection. Thus, I use SET([Fields],1) to carry the
Current Fields Selection and ReSet the list to all(i.e. Set Field to)
But the selection listbox need to fill in the value.
Finally, I trace it inside VFP and setting StrTran() to remove the return value:
CurrentFieldlist = StrTran(Set([Fields],1), [MyAlias] + [.])
Set Field to
THisform.totalfieldlist.rowsourcetype = 0
THisform.totalfieldlist.rowsourcetype = 8
THisform.totalfieldlist.rowsource = [MyAlias]
...
but in executable file: the list become a value
[all]!!
I want to know why VFP500.DLL
do not work as inside VFP.
This is
NOT What you see, what you get!!
Okey, In your advice, I can use Afields() to carry all field information and
use following code to fill in the listbox.
CurrentFieldlist = StrTran(Set([Fields],1), [MyAlias] + [.])
Set Field to
Afields(ArrayFields)
THisform.totalfieldlist.rowsourcetype = 0
THisform.totalfieldlist.rowsource = []
For iX = 1 to Alen(ArrayFields)/ 16
Thisform.totalfieldlist.additem(ArrayFields[iX, 1])
Endfor
Anyway, this would be the fault of VFP, not me Unless there is NO Set Field function at all.
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.