Open Form with a TabSheet the go to second tab

K

Kevin Baker

Hi Everyone!

I have a form with a tab sheet on it, when the user opens the form, I need
the form to go to the second tab (page), how can I do this?

Thanks
Kevin
 
R

Rick B

Just put a setfocus command in the form's open event. Set the focus to one
of the fields on that second tab sheet.



Me.SomeFieldName.setfocus
 
P

PC Datasheet

Put the following code in the Open event of the form:
Me!NameOfTabControl.PageIndex = 1

Page numbering starts at 0.
 
K

Kevin Baker

Worked great!

Second questions.. When I select Page 0, the page 1, and go back and forth,
nothing on the pages has the focus.. is there a way when the user clicks on
the page 1 tab that I can set the focus to something?

Thanks,
Kevin
 
Top