>Hi everybody,
>
>I have a form, that calls my colleague's Batch Process on Close. The process creates an instance of private session class and then switches DS to the data session of this instance. And the grid on my form goes blank.
>
>How can I ensure this process and DS manipulations do not affect my form?
>
>Thanks in advance.
>
>
Latest (I hope) update: >putting
>select 0
>thisform.ReallyLockScreen(.t.)
>
> before the process solved grid's problems.
Sounds like what I just wanted to say - it's probably the grid trying to refresh, and not finding its recordsource in the current DS. Locking the screen should stop these refreshes.
Another thing to try (if you're not OK with locking the form) would be to set focus to anything but the grid before instantiating the new DS.