Question : MS Access Tab control on a multi-page form cause page shift when tab page changed

I have a large main form with several pages using page breaks. It works fine and has for some time. Over time it has become too busy and I figured I could add a tab control on a one of the pages then seperate the subforms contained on that page to their own tabs. My problem is when I click on a tab that contains a subform the page shifts so that the subform is at the bottom of the form exposing part of the page above. I have tried to set the focus to the parent form and then goto the correct page and this works but only for tabs without subforms. I have build a simple DB to replicate the problem which I have included. I have removed the simple setfocus, gotopage commands so you can see the movement of the forms pages when switching tabs. This is only when the focus changes from a control to a tab page.

Answer : MS Access Tab control on a multi-page form cause page shift when tab page changed

Experts

I believe my question was being looked at too deeply.

The solution
1. Set the focus to a control on the main form
2. Move the form to the desired page.

The code on the On Change event of the Tab Control

Private Sub TabCtl0_Change()

Me!Control on MainForm.SetFocus
DoCmd.GoToPage #

End Sub

Thanks for you participation
Random Solutions  
 
programming4us programming4us