>>Either use the SAFE SELECT technique,
>>query to a second cursor
>>then zap your grid's cursor
>>append into the grid's cursor from the second cursor
>>
>
>"SAFE SELECT" - a phrase that makes me smile whenever I see it :) Since there is a "SAFE" select, there should be the "UNSAFE" version of it? If so, what is that? I always thought selecting was safe.
>
>The process you describe for "SAFE" in the above is actually done simpler and I never thought to call it "SAFE":
>
>-(Save grid recordsource) and set it no null or empty string
>-Query into that recordsource cursor or any other cursor you like
>-Restore the recordsource
This does not work if you have some other objects added in the grid, like checkboxes etc. The grid gets completely messed up after re-setting the recordsource.
My experience is to create a grid class with all relevant settings and instantiate them on the fly.
1. Destroy grid (REMOVEOBJECT)
2. Select into cursor
3. Create gridobject (NEWOBJECT)
4. Set recordsource
Nice thing, if you have similar or same grids on different forms, you don't need to duplicate code, but instead instantiate them on the fly from the same class or subclass.
Christian Isberner
Software Consultant