Hi!
There are more tricky and simple way for case INLIST(this.recordsourcetype,3,4). In Init method of grid you can extract alias from control source of columns, they're ALWAYS 'alias.field'-like.
>For example something like
>EVAL(IIF(this.recordsourcetype = 4, "'" + SUBSTR(this.recordsource, RAT(" ", this.recordsource) + 1) + "'", this.recordsource))
>goes instead
this.recordsource...
>:)
>(assuming that "...INTO CURSOR ZZZ" is at the end of SELECT statement and probably nobody uses RecordSourceTypes 2 and 3 anyway :)
>
>
>>Hi, Nick!
>>
>> What if RecordSource is SELECT - SQL statement? :)))
>>
>>>Or, IIF(RECNO(this.RecordSource) = grno... so you are not hardcoding the alias.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.