The way of determining what tab the user clicked on in a tab control differs depending on how a Tab Control is defined.
If a Tab Control is define via the "Edit String" button or as a text array, it is possible to just reference the list itself. In the following code, the Tab_Control will return a long integer with the number of the tab the user clicked on.
If a Tab Control is a defined via a Choice List or references a Hierarchical List, it will always return it's reference number. To return the number of the tab the user clicked on requires the use of the "Selected list item" function. For example, the code below will return the tab the user clicked on.
For more information on the subject of Tab Controls refer to