David Emerson
davide at dalyn.co.nz
Mon Jul 28 00:00:21 CDT 2003
Sorry to bother everyone. I found that if I don't set the focus after I have done the search then the screen doesn't change. Problem solved. However I did discover the PreviousControl property - this may come in handy in the future. David At 28/07/2003, you wrote: >On 28 Jul 2003 at 10:54, David Emerson wrote: > > > I have a form with a tab control which has 3 tabs. The third tab has a > > subform with a tab control on it and 2 tabs. The second tab of the > subform > > has another subform with a tab control having 4 tabs. > > > > On the main form I have a search box. Currently if this is used the focus > > ends up with the first tab on the main form (it uses this field to search > > on using DoCmd.FindRecord). My users want to be able to search but end up > > with the focus on the particular tab they were in before the search. > > > > My problem is that I can't find a property that says what is the current > > tab. I can find the current field but unless I know the tab I can't just > > set the focus to that field. Any hints? > > > >myTab.Value gives the page number of the currently displayed page >(zero based) of the control myTab > > >"The Value property of a tab control contains the index number of the >current Page object. There is one Page object for each tab in a tab >control. The first Page object always has an index number of 0, the >second has an index number of 1, and so on."