Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Tabbed form will not stack - Why not?

I am designing a tabbed form that will not stack.  I have set Multi Row = Yes but the tabs keep going horizontally.  What am I doing wrong?
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

How about a screenshot of the issue ?
Do I understand that you want the tabs to be on the side, rather than the top, of the Tab control?  If so, this may be useful:

There isn't a built-in way (unless they've added one while I wasn't looking), but you can fake it by setting the tab control's Style to "None" (no tabs or buttons) and placing an option group with toggle buttons beside it.  Then you would use the AfterUpdate event of the option group to set the Value property of the tab control to show the page associated with the selected button.

There are other ways to fake the tabs -- you can use labels or images, say, and fool with their properties when they are clicked to make the "selected" control look like a selected tab.  But the main principle is the same -- use some other controls to simulate the tabs, and use the events for those controls to change tab pages by setting the tab control's Value to the PageIndex of the page you want to show.


I just tested this in my Dev database;  looks like it'd work.  The syntax for the button(s) would be
Me.TabControlName.Value = N
with N being an integer referring to the tab you want the button to display.  Remember that the tabs are numbered 0 thru (count of tabs - 1).
You won't see multiple rows until the horizontal width of the control is exhausted.
Avatar of SteveL13

ASKER

Pat, I have the horizontal of the form and the tab control width set at 14.75".    But still in design mode the form keeps expanding horizontally as I add tabs.
I hope that this : https://www.sourcecodester.com/microsoft-access/hotel-reservation-system-ms-access.html is the application I have seen some years ago...I think it comes close to what you need
You might also consider using the Microsoft Forms 2.0 TabStrip (on the Design tab, in the Controls section, click the ActiveXControls line, and scroll down to Microsoft Forms 2.0 TabStrip).  Add the TabStrip to your form, and open the Properties popup menu.  On the Other tab, you can set the Style to Top, Bottom, Left, or Right.
I'm not sure that the ActiveX controls are still supported in the 64-bit version of Access.   I think that was one of the reasons I didn't convert.

Steve, 14.75" is very wide.  Try making it narrower just to see what happens.  And please post a picture of the main form in design view so we can see what you are seeing.
Here it is.  (attached)  I want the form to be about 1/2 as wide as it is.
Tabbed-Form-Copy.jpg
Then probably use 2 subforms ...to "emulate" the effect...
I don't understand it though.  I've done it before.  And it worked.
And please post a picture of the main form in design view so we can see what you are seeing.
That is not design view.
Please make the form narrower in design view.  It is much wider than it needs to be.

I also can't tell because of the way you cropped the image whether or not you are maximizing the form or using tab view.  Both cases will make the form as wide as the Access window and that will affect the way the tabs are displayed.
Well it seems that something is blocking the MultiRow behavior but it did worked in the past (older versions ?)
I have found this post which recommends exactly what you have done but i cannot reproduce it
How to get tabs to go on multiple rows
User generated image
That "something" is the width of the tab control.
@Pat i have tried that before i posted...
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
John.  Perfect!  Thanks again.  Was driving me crazy.
It almost drived me crazy...i did bite the bullet and i was certain that it was a Version issue...(i have tried in Access 2003 and it worked right away)...so what (!)...and then i thought it must be something else..
Good catch John.  I sent a bug report to Microsoft.  I'm sure the behavior is "by design" but it does feel like a bug.  Thanks.