Set grid's Recordsource to the empty string before changing it.
Thisform.mygrid.Recordsource = Space(0)
...
Thisform.mygrid.Recordsource = "newcursor"
See faq #8019 for more info.
>I have a form with a grid that should enable switching between a few datasources (with the same structure). How to do this in simplest way ?
>I tried something like this but grid columns properties (datasources) was destroyed:
>lcOldRecordsource = thisform.grid1.recordsource && Customers
>thisform.grid1.recordsource = ""
>use in Customers
>use Customers5 as Customers
>thisform.grid1.recordsource = lcOldRecordsource
>
>Maybe someone has a solutiom. Thanks in advance.
--sb--