Tab Control Question

  • Thread starter Thread starter JohnB
  • Start date Start date
J

JohnB

Hi.

I use a Tab Control form as the main switchboard in one of my mdbs (Access
2002 on XP, networked).

I want to create a new Tab such that, when clicked, a new Tab Control form
opens and fills the full screen.

I believe there are then two ways this could work - either the new Tab
Control overlays the old one and when the new one is closed, the old one
appears. Or, I could arrange for the old one to close when the new one
opens.

I cant decide which to go for so, could anyone suggest ways of doing both?
Then I can try each one out first.

Thanks for any help, JohnB
 
JohnB said:
Hi.

I use a Tab Control form as the main switchboard in one of my mdbs (Access
2002 on XP, networked).

I want to create a new Tab such that, when clicked, a new Tab Control form
opens and fills the full screen.

I believe there are then two ways this could work - either the new Tab
Control overlays the old one and when the new one is closed, the old one
appears. Or, I could arrange for the old one to close when the new one
opens.

I cant decide which to go for so, could anyone suggest ways of doing both?
Then I can try each one out first.

To close the first form...

DoCmd.Close acForm, Me.Name
DoCmd,OpenForm "NewFormName"

To NOT close the first form just omit the first line.
 
Thanks for such a quick reply Rick.

I presume I should put this code in the new Tab pages On Click Event.

Thanks again, JohnB
 
JohnB said:
Thanks for such a quick reply Rick.

I presume I should put this code in the new Tab pages On Click Event.

Nope. That event is fairly useless. You would need it in the Change event
of the entire TabControl and in the code you test the Value property of the
TabControl to determine which page was selected.
 
Back
Top