If this happens in the open event of a window, try to post this functions or do a yield() before.
Tip:
Declare a user event ue_postopen() in the window and do a post ue_postopen() in the open event.
In the ue_postopen() write your selecttab() and setfocus().
hth
Arnd
Following on from Arnd's great suggestion, what is the return value of the SelectTab call? ie does it indicate that it actually has succeeded?
Also, are you playing around with redraw at all? Probably unlikely, but if redraw is turned off you may not see the tab as being selected until redraw is turned back on.
Good luck.
Nathan
Add a comment