How Do I Automatically Return Back to the Parent Form by Tabbing Out of the Last Control of the Subform Display? (Magic xpa 4.x)
When the user tabs into a subform, they might expect to be able to tab out of it also. You can do this easily by using a control event. However, a subform program might also be called as a stand-alone program, in which case you might not want the program to exit by tabbing. So, you use the SubformExecMode() function to control when you want the exit to happen.
-
Decide which control is the last one on your form, and make sure it has a control name. In this case, the last control is named “Notes”.
-
Create a Control Suffix event, selecting that control’s name.
-
Create a Raise Event operation, with the Cnd of
SubformExecMode(0)>=0
SubformExecMode() returns -1 if the task is not called as a subform. The other return codes give more information about how the subform task is being called. See the Magic xpa help for the function for more information.
The Online and Rich Client Samples projects (program SB06 and RSB06)