Hei Kjell,
I usually use a cursor as controlsource for the grid. In the init of the form, I create the empty cursor. When I SELECT, I do the following
SELECT * FROM myTable INTO CURSOR curTemp WHERE whatever NOFILTER
SELECT curGridSource
ZAP
APPEND FROM DBF('curTemp')
myGrid.refresh()
Since this never releases the controlsource, the grid will not be changed.
>Hallo!
>I wonder if anyone can help me with a problem I have.
>
>I do a SQL-select, and open a form with a grid that shows the SQL result.
>It works as it should... BUT
>If I make a new SQL-select while the form is open, I loose the headers, columns and everything in a grid. The only thing left is a white square.
>I can not make a refresh or anything. But if I close the form and then open it again, the result is showing in the grid.
>
>In a list or combo I can use requery to update with new data, but how do I do in a grid?
>
>Thanks
>/Kjell