Switching tabs on a table using LotusScript

I have database containing a couple of forms, two of which are using programmable tables. In the Querysave event of those two forms, I have it call a field validation script (Select Case) that I run on all of the forms.

Here is my problem…

If there is a validation error on say tab2, and the user is currently on a different tab, I would like the code to switch to the tab containing the field with the validation error. It already puts the focus of the cursor in the proper field, but it does not switch over to the proper tab. I need help modifying the code to have it switch over to the proper tab. How and where do I set the values for the table name and tab names to get this to work.

-Sleepless in Seattle (well CT but definitely sleepless)

Subject: Switching tabs on a table using LotusScript

Hi Kurt.

I was in the assumption that doing the GoToField would also switch to the tab. But I think you can do the follwing to set the current tab from LS.

-In the properties of the tabbed table → last tab <@> you have to set the table name (e.g. SelectedTab).

-On the same tab of the properties window give each row (=tab of tabbed table) a unique name (Row Tags, Name)

In formula the following works:

FIELD $SelectedTab:= “TabName”;

@Command([RefreshHideFormulas])

So in script the follwoing will work as well I assume:

uidoc.FieldSetText(“$SelectedTab”,“TabName”)

uidoc.RefreshHideFormulas

Hope this helps,

Bas