Link to home
Start Free TrialLog in
Avatar of Buck Beasom
Buck BeasomFlag for United States of America

asked on

Design View Opens All Forms

I have one Access application that more than one user has been designing. For some reason, when I open one form in Design view and view the code, I end up having to close a whole bunch of other form code windows, too, even though I did not open them.

Is there some setting that needs to be changed to stop this from happening?

Thanks.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

that is a normal behavior of the code window.

click on the maximize button of the  code window so you will not be annoyed by the other forms' module
Access doesn't automatically close the module windows when you close the VBE, so if you want them closed, close them before you exit.  
Or download MZTools (www dot mztools dot com)  It is a very useful collection of tools for working with code.  There is also a close all code windows button.
As noted above, this is the default, and as far as I know, unchangeable behavior of the code window.
Moreover, you can sometimes find that when you open the VBE, the modules that are open are NOT ones that you can recall having opened yourself to do some editing and then forgotten to close.
If Access 2003 has a Close All button or option, I've never found it.

There's a keyboard shortcut for closing code windows
CTRL-F4

Hold them down and all open windows will close.
@Nick
you can sometimes find that when you open the VBE, the modules that are open are NOT ones that you can recall having opened yourself to do some editing and then forgotten to close.

Oh God do I hate that!
It's always a bit of mystery why some modules are open in the window, isn't it :)
@Buck_Beasom,
I have one Access application that more than one user has been designing.
This may be a recipe for problems in the future.
Each designer will have their own ideas of how/when things should be done.
Some will use DAO, others will use ADO, still others will use SQL.
Some will use Case-Select, other will use If-Then-Else.
Some will use single line declarations: Dim FName, LName, as String
Some with use the numeric Constants, other will use the keywords
Some will use OnOpen, others will use OnLoad.
...etc

I don't know how you are managing versions or what your "approval" methodology is, but having more than one Access developer can be difficult to manage...

JeffCoachman
As far as your issue here...
;-)
Over the years, I have just learned to ignore that particular oddity of the code window(s).

I open the code environment from whatever event I need, then I am sure to be in the correct "module".
Then I maximize that code window.
Thus, I never see another code windows.
If I need another form/module,..I will simply double-click on it in the navigation pane, ...and it too will be maximized.
Thus I never see (and subsequently, never care about), any other open code windows...

Even if there was a way to close all the code windows, I am not aware of any memory savings you might get, and I am not sure it would be worth the trouble...

JeffCoachman
Avatar of Buck Beasom

ASKER

The weird part is this only occurs in one application. For all the other ones (and there are dozens) you open one code window, you close one code window and that's it. But in this one, I open the code window for the form I am working on and when I close it, I then have to close half a dozen other code windows, too!
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America 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
The weird part is this only occurs in one application.

Because some stupid person at MS in invented FilterOnLoad and someone, who if I ever should meet them in the right circumstance I would cut, decided that said such stupid property would default to True, I have a button that will throw each form in turn open in design view, and then ask me, if a Filter property exists, if I would like it to die.

Running that button -- even without changing a thing -- causes modules to be open in the code window afterward.  I just tested that.

Your one app is clearly doing things that cause the code window to be opened.  Lord only knows what the root cause is, but it is not unusual at all.  it can be as simple as manipulating .Caption properties for reports.  Maybe filters, too.

It's normal, default behavior.