Tabbed Tables and Post open event

I have a profile document that has a tabbed table with a different field on each tab. On this profile document I am running a post open event to read an environment variable, and based on that variable the cursor is placed in that field. The environment variable is set by using different action buttons. This scheme worked perfectly in R5, and the users liked it because it took them exactly where they needed to go without having to search for a tab. The problem is in Notes6 for some reason the tab labels receive focus as well as the fields. So when my code runs, the cursor goes to the right field but the tab doesn’t change. I checked and couldnt find a setting for tab label focus. Is this a bug or does anyone have any ideas? Below is my code. Any help would be appreciated.

This is from one of the action buttons.

Sub Click(Source As Button)

Dim workspace As New NotesUIWorkspace

Dim session As New NotesSession

Dim uidoc As notesuidocument



Call session.SetEnvironmentVar( "ABC_Profile", "Eyes" )

Set uidoc=workspace.currentdocument

Call workspace.EditProfile ("Profile")

End Sub

and this is from the post open event on the profile doc

Sub Postopen(Source As Notesuidocument)

Dim workspace As New notesuiworkspace

Dim session As New notessession

Dim uidoc As notesuidocument

Set uidoc=workspace.currentdocument

Dim environment As String



environment = session.GetEnvironmentString( "ABC_Profile" )

If environment="Eyes" Then

	Call uidoc.gotofield("profile_eyes")

Elseif environment="Hair" Then

	Call uidoc.gotofield("profile_hair")

Elseif environment="Race_Sex" Then

	Call uidoc.gotofield("profile_race_sex")

Elseif environment="Business" Then

	Call uidoc.gotofield("Profile_Business")

Elseif environment="Business_Type" Then

	Call uidoc.gotofield("profile_business_type")

End If

End Sub

Subject: Workaround. Use @Commands. A combination of @Command([EditRight]) and @Command([EditDown])s combined with @Environment should get you there.

Subject: Re: Tabbed tables/postopen event – GotoField

If it’s a programmable tabbed table, can’t you have it depend on a computed for display field to go to the correct tab? Use @Environment in the CFD formula. Then the Postopen event can place the cursor in the field that’s already displayed on the current tab.

Subject: How would a CFD field get to the right tab?

Subject: The same way your Postopen event knows which field to go to.