>The grid recordsource = 1 (alias)
>
>AND it is viewed d/l from mySQL server ordered by tx_date
What's alias name, 'ptt1'? Anyway, you cannot use alias in any function in the SELECT statement because it will reference original table/cursor not the one used by query.
SELECT RECNO() as a FROM tmpVisit1 ;
INTO CURSOR tmp WHERE tx_date = tdate
--sb--