tblctl and forms (again)

swarv

Registered User.
Local time
Today, 13:01
Joined
Dec 2, 2008
Messages
196
hi all,

I know this has been answered quite a few times and I have looked on the boards but still with no luck.
the bad thing is I know this is an easy question and im kicking myself as to why it isn't working.

I have tblctl14 on a form and in the page Absent there is a button which calls another form.

now when you come out of the other form the main page defaults back to page index 0. I want it so that when that form closes the main page goes back to page index 1.

Thanks

Martin.
 
You need to able to trap which tab page had the focus when another form was opened and set the Tab Index accordingly.
 
not quite sure I understand.

You have to go into tab index 1 to open the form. then when you close the form the main page takes it back to tab index 0. I want to go back to the same tab that form was opened from i.e. tab index 1.
cheers
 
Pick the first control on the desired tab then set focus to it. Alot depends on how many forms are opened by the main form. As to your approach. You could set a public variable tIndex as Integer

Then on the button that opens the form pass the page tab index value of the tab control to the tIndex variable.

And on the on open/activate of the main form get it to change the tab index to match the tIndex value. If the value has not been previously set then it will default to the first page.
 
how do you get the page tab into an integer?
Thanks
my tab control is tblctl14 and first tab is personaldetails and second tab is Absent.
 
To change to page focus use

Me.TablCtrl.Value = n where n is the page you want to display.
 

Users who are viewing this thread

Back
Top Bottom