Hi,
Set the recordsource and controlsource to "", do the SQL then reset the recordsource and controlsource, like below
.RECORDSOURCE = ""
.RECORDSOURCETYPE = 1
.column1.CONTROLSOURCE = ""
.....
select .....
.RECORDSOURCE = "your record source"
.RECORDSOURCETYPE = your type
.column1.CONTROLSOURCE = "your control source"
.....
>Hi all
>That's a classic grid recordsource question, and i know i have this fixed somewhere, but i gave up finding the code...
>I need to set a cursor as recordsource of a grid. The grid is formatted ( different backcolors for columns, bold font in some places etc... ).
>If i run:
>select .... into cursor myCursor
>thisform.myGrid.RecordSource="myCursor"
>the grid looses all the formatting. Also, should i set each column's controlsource everytime i recreate the cursor?
>
>Thanks
>Jaime
Regards N Mc Donald