private cFilter cFilter = filter() set filter to do form AnotherForm && would work with other tables in this form select MyTable set relation to blah blah blah set filter to &cFilter thisform.MyGrid.refresh()I use a private variable cFilter to store the current filter setting and try to restore it after another form is executed, but it's failed, the content of the grid in not filtered after the above events..
private cFilter cFilter = filter() set filter to do form AnotherForm && would work with other tables in this form select MyTable set relation to blah blah blah <b>wait window transform(cFilter)</b> set filter to &cFilter thisform.MyGrid.refresh()The code works now! But no one would show users the filter settings when the program is running, right? What should I do now? Why does my code only work probably with a wait window command?