Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fields in a listbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00870195
Message ID:
00870235
Views:
13
>Hi Steve.
>
>Is, however,there a way to return the name of that column i.e. field of the table?
>
>That depends on what the RowSourceType is < s >. If the RowSourceType is 2-Alias, all you need to do to get the name of the field in the underlying data is this:
>
>
>lcFieldName = FIELD( 2, This.RowSource )
>
>
>If the RowSource is 3-Sql Statement, you can use the same logic as above, but instead of This.RowSource, you have to use the name of the cursor that is the desitination in the SELECT statement.
>
>If the RowSource is 6-Fields, you can parse the name of the field from the RowSource. For example, if you want the second field name, you would do it like this:
>
>
>lcFieldName = ALLTRIM( GETWORDNUM( This.RowSource, 2, ',' ) )
>
>
>To get the name of the table when the RowSourceType is 6, use this code:
>
>
>lcAlias = GETWORDNUM( This.RowSource, 1, '.' )
>
Marcia,

How about
JUSTSTEM(This.RowSource)
instead?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform