>To all,
>
>I need to close and then reopen the table associated with a grid. In doing so I loose the grid's formatting. I can redo the format in code, including the RecordSource reference (unless there is a better way) but I also loose the code associated with a field's click event. How can I get my click event code back? My RecordSourceType is 1 - Alias.
>
>
>
>Thanks,
>Allen
Allen,
The first question is Why do you need to close and reopen the alias for the grid? What are you doing that requires this?
Secondly, you have a problem in that the grid goes insane when you rip the recordsource out from under it. You can try a few things that may help.
1) change the recordsource to "" then close and reoopen, finally reassign the recordsource.
2) populate the grid with columns that you have defined using the DEFINE CLASS syntax. When you close the recordsource and reopne it, strip out all the columns and recreate them using Thisform.Grid1.AddObject() and setting the appropriate proeprties.
3) eliminate the need to close and reopen the table and the whole problem goes away.