I am calling one form from another. But after working in the called form, when I come back to the calling form, the grid that was there in the parent form is gone; instead, a white path comes. This is only when I call a form from another form that has a grid.
Why is this?
The called form may be accidentally closing the alias that is the grid’s recordsource. If this is the problem, you may want to consider giving the grid form a private datasession. This is accomplished by setting the form’s DataSession property to 2, which insulates the alias of the grid form from being affected by any other form.
Another trick is to set the grid’s recordsource to itself. For example, in the Activate method of the grid form:
this.oGrid.RecordSource = this.oGrid.RecordSource this.oGrid.Refresh()