I must admit I've not tried "this.RowSource=..." from the grid's Init method but anywhere else the string is CUT at approx. 255 chars. The usual sympton being "... syntax error ...".
Rgds
Petras
>Actually the rowsource property can be longer than 255 characters, I believe it has the same limit as any other character variable 2 gigabytes. It is the property sheet that has the limit and prevents you form entering more than 255 characters. If you were to assign the rowsource proeprty in the Init code for the grid it would probably just fine.
>
>
>* Grid's Init
>THIS.RowSource = "SELECT a lot of fields " + ;
> "FROM a lot of tables " + ;
> "WHERE a lot of conditions " + ;
> "GROUP BY a lot of grouping stuff " + ;
> "ORDER BY a lot of ordering stuff " + ;
> "INTO CURSOR MyGridData"
>
>
>Leave the rowsource blank in the property sheet but set the rowsourcetype to SQL.
Petras Virzintas