Don't forget that you should set the recordsource of the grid to "" BEFORE you close it's table or any formatted columns, column controlsource etc. will revert to unformatted.
Barbara
>
>Ok, you drove me nuts with this one so I had to poke at for awhile! I set up a test situation with two grids that showed clients (parents table) and accounts (child table). I did a SET RELATION TO in the form's .Init() code, then placed code in a command button's .Click() to remove the relation. After tinkering, here's what I had to do to show all accounts after the relation was broken:
>
>
select clients
>set relation to
>select accounts
>use
>use accounts in 0 shared
>THISFORM.grdAccounts.RecordSource = "accounts"
>THISFORM.grdAccounts.Refresh()
>
>The trick was to reset the .RecordSource of the child grid. When an alias used as a .RecordSource is closed, the grid loses the reference.
>
>Now I can sleep tonight!