Full Version: Windowing Options In Code - Is It Possible?
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
iandouglas
Hi All

On a per db basis in Access options you can choose to have opened windows, in my case forms, displayed as Overlapping or Tabbed.

Is it possible to change from one to the other in code?

My db's normally run in overlapping mode with the current form maximised but for 3 particular forms it would be really neat to open them simultaneously in tabbed mode & then revert to overlapping when the user exits these 3 forms.

TIA

Ian
Peter46
It may be possible to change the setting in code but even if it were possible you would have to close and re-open the database for it to have any effect.
pere_de_chipstick
Hi Ian

As an alternative, could you place the three forms as subforms on a tab control on a pop up form?
BananaRepublic
Also, note that you still have have "floating" windows in tabbed moed if you specify your form as a pop-up or open it using acDialog parameter in the OpenForm.
iandouglas
Hi all

Thanks for your interest & your replies - I very much appreciate your help.

It's as I feared - the idea sinks 'cos of the need to shut the db & re-open it.

I thought of the 3 subforms on a tab control idea but if I go down that route I'll need to re-code lots of things that currently think they are being run from & form & don't want to be run from a subform on a tab control. So really its probably not worth it.

I think I'll open them as a group each maximised & have command button on each to bring the desired form to the front, then close them as a group.

Thanks again for your help!

Regards

Ian
gemmathehusky
I take it this is A2010

I do not use any default windows positioning. I do use some code I got a long while ago from the Access Cookbook (A97 and A2003), which stores the size and posiiton of each window in the registry and restores it to its last position when it is re-opened, and continue to use this in A2007/A2010. This enables any user to configure each form to suit his own requirements

I am sure you could easily amend this to calculate positions and resize all open forms to a sort of "tabbed" layout - although you may not see named "tabs". The code itself would be instant - it's only a handful of calculations. You could even specify a z-order (maybe in the forms tag property) to determine the order in which the forms are made to overlap.

BananaRepublic
QUOTE (gemmathehusky @ May 18 2012, 07:55 AM) *
I take it this is A2010

I do not use any default windows positioning. I do use some code I got a long while ago from the Access Cookbook (A97 and A2003), which stores the size and posiiton of each window in the registry and restores it to its last position when it is re-opened, and continue to use this in A2007/A2010. This enables any user to configure each form to suit his own requirements

I am sure you could easily amend this to calculate positions and resize all open windows to a sort of "tabbed" layout - although you may not see named "tabs".


Wouldn't it be much simpler just to use tabbed mode and uncheck "Show Document Tabs" which has the effect of making the application appear as if it's a SDI, with all forms maximized to the Access window's dimensions? No code needed.
gemmathehusky
QUOTE (BananaRepublic @ May 18 2012, 02:00 PM) *
Wouldn't it be much simpler just to use tabbed mode and uncheck "Show Document Tabs" which has the effect of making the application appear as if it's a SDI, with all forms maximized to the Access window's dimensions? No code needed.


probably, but I tend to develop in A2003, and just convert to A2007/A2010, and I don't think those options are available in A2003. I need my stuff to work in A2003, for most occasions.

Until MS bring out a version of windows that won't run A2003
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.