>Hi Naomi,
>
>>The form in question has all complex logic of setting filter, etc. in its Activate method. It makes the debugging of this form much harder.
>
>If every form changes the data session to the same one, then every one operates on the same work areas. Hence, every form would need to restore its environment every time the form is activated.
>
>I wouldn't move it into the Init event. It's better to find a work around for your debugging problem. What exactly is making debugging harder?
When I switch from Debugger back to the form, sometimes the Activate fires again.
I don't see any particular code of restoring the environment. Actually, at least some of the restoration code is here:
IF EMPTY(KEY())
IF INLIST(.cPassedSearchType, "QUOTE", "SALE")
SET ORDER TO TAG changedte1
ELSE
SET ORDER TO TAG configdte1
ENDIF
ENDIF
Give me a second to test it by moving to the Init (as I already did temporarily), then I'll remove it - I want to chase the duplicate record for now.
If it's not broken, fix it until it is.
My Blog