>This is i problem I have been fighting with for a very long time and newer got any good solutions... When i'm working with a grid I often create a temporary table (in dataenvironment.beforeopentables) which I edit in grid. So far so good. The problem is when i'm moving around in the "real" table and need to update my temporary table with new records. My forms refresh method looks something like this:
>
>select tempgridtable
>zap
>select realtable
>scan for....
> insert into temptable ....
>endscan
>
>If any object except the grid has the focus when i'm doing form.refresh() everything is fine and all the records shows correctly. But if the grid has the focus then the grid becomes empty. Why?
I think you're fighting the wrong battle, views are really better for that. But for a quick fix, you need to set the recordsource to '' (empty string) before you ZAP and refill the temp table. Then set the source back to the temp table...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.