>I have a grid based on a cursor created in the Load() of the form. If I rebuild my cursor via another SQL-SELECT later, the grid lose all it's columns. I tried to reinitialize the grid RecordSource and every columns ControlSource, but all the columns name have been reinitialized (what was named colList is now Column1). Why?
>
>Is there a better way to do this? I was thinking about a parametized view, but not all criteria are filled all the time. Sometime, I just need to filter the date field, another time the client name, etc.
>
>TIA
Hi Sylvain,
Simply blank the recordsource of the grid before doing anyhting that closes the cursor - i.e. re-running the SQL:-
loForm.grid1.RecordSource = '(None)'
The SQL
loForm.grid1.RecordSource = 'CursorName'
Ian
regards
Ian