Naomi's URL points you to an article which describes both how and why you should use another techniques than setting the recordsource to empty. To ease the reading pain, this is the short version of this technique:
Select whatever into cursor curdummy
Select yourcursor
Zap
Append from dbf('curdummy')
yourgrid.refresh()
As you see the change in code is very little, but the impact is huge.
>Hi all,
>
>i have a grid on a form. from time to time i put the recordsource of the grid blanc.
>thisform.mygrid.recordsource =''.
>
>Most of the time this works well but from time to time i get an error message like :
>no table is open in the current work area when i emtpy the recordsource.
>
>anybody has an idea whats going wrong ?
>
>thnx