TAB CONTROL

G

Guest

I have a tab control form and on each tab I have a subform, what happens is
that when I open the main form which contains the tab and subform, it
imeadiatly goes to the top of the subform and then the user has to constantly
scroll up to see the tabs is there a quick solution to this?

cheers in advance...
 
R

Rick Brandt

Songoku said:
I have a tab control form and on each tab I have a subform, what
happens is that when I open the main form which contains the tab and
subform, it imeadiatly goes to the top of the subform and then the
user has to constantly scroll up to see the tabs is there a quick
solution to this?

cheers in advance...

That happens when the subform *control* is not large enough to display all of
the form within. Even a couple of pixels that you woudln't notice otherwise can
do this. Either make the control larger or the form smaller.
 
R

Rod

I had the same issue, so what I did was created another tab control in the
header of the form and set the original tab display style to none.. On the
new Tab Control in the header I created an Event Procedure OnChange to set
the focus of the appropriate tab.

If me.TabControl = 0 then me.page0.SetFocus
If me.TabControl = 1 then me.page1.SetFocus

And I did this for as many pages as I have.

This also helps as if they are at the bottom of a form they can still see
what tab they are on and can switch to a new tab without having to scroll
back to the top.

Hope that helps,
Rodger
 
G

Guest

Rod,

I have the same issue with tabs today and i tried what you suggested.
However, i am now getting the following error:

Complie error: Method or data member not found.

Any idea what could be causing this? I'm using Access 2003.

I appreciate any help you can give.
 
G

Guest

I just entered what you had in the previous post. Was i supposed to change a
field name in the code?

Private Sub TabCtl5_Change()
If Me.TabControl = 0 Then Me.page0.SetFocus
If Me.TabControl = 1 Then Me.Page1.SetFocus

End Sub
 
R

Rod

Yes I am sorry if I did not make that more clear. For youe example replace
TabControl with TabCtl5 and what ever you have your pages named. I wanted
to make it a little easier when I went back and looked at the code, so I
named my pages starting with page0 as the first page has a value of 0 . . .
.. Does that help?
 
G

Guest

Thank you, I'll try this and let you know. I had the feeling i was doing
something wrong. I appreciate your help!
 
G

Guest

thanks for the heads up Rod!!!

Rod said:
I had the same issue, so what I did was created another tab control in the
header of the form and set the original tab display style to none.. On the
new Tab Control in the header I created an Event Procedure OnChange to set
the focus of the appropriate tab.

If me.TabControl = 0 then me.page0.SetFocus
If me.TabControl = 1 then me.page1.SetFocus

And I did this for as many pages as I have.

This also helps as if they are at the bottom of a form they can still see
what tab they are on and can switch to a new tab without having to scroll
back to the top.

Hope that helps,
Rodger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top