Opening to a certain tab

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,


I'l looking for a way of opening my form with a button and going to a
certain tab within that form.

Any help would be very welcome....

Paul
 
I have had to do this many times, although usually within the form containing
the tab pages, but the same principle applies


generate a command button, then edit the 'on click event'
and type

docmd.gotocontrol ("conttrol name")


for 'control name' type in the full conext of the tab page, eg

=Forms![Main tab]![Page1] or similar
 
In Form_Open:
Me.tabMain.Pages(0).SetFocus
would display the first page of a tab form. Numbering starts at zero (This
value is the same as the Page Index value from the property sheet). You can
also use the name of the page:
Me.tabMain.Pages("pgFirstPage").SetFocus

HTH,
 
Back
Top