Controlling Form Tab Access from a Program
An application program can control the form tab focus (which form tab is active), change the text on the form tab header for different program conditions, and protect (disable) form tabs.
To set program control of form tabs