Toggle Navigation Tabs On/Off in VBA

DCrake

Remembered
Local time
Today, 04:19
Joined
Jun 8, 2005
Messages
8,626
I have a A2007 application that I have developed in A2003 If I design a form in 2007 and have the Form Navigation tabs flag unchecked I cannot find a way to close a saved form. However if I turn them on I can. The issue is I don't want to have to do this prior to opening the app. Is there a way to toggle them Off on load and On on Unload?
 
Hello David, what do you mean by the Form Navigation tabs flag? Where is this located?

Or are you referring to Tabbed Documents or Navigation Pane?
 
I think it is tabbed documents
 
Been having a look, this is it:

CurrentDb.Properties("ShowDocumentTabs").value = BooleanValue

You can only set the check box value, apparently. As with any db option, it would require a restart as well (as you know), unless you have a workaround.
 
Last edited:
I understand that but the crux of the matter is why does A2007 not give you the opportunity to close a form from design view? Even if I scrool the boundaries there is no close button, neither does it exist in the ribbon.
 
I now understand the predicament. I've only just noticed the behaviour. A workaround is to Add the 'Close Window' button to the Quick Access Toolbar. Under the 'Choose commands from:' drop-down box in Customize, select 'Commands Not in the Ribbon' from the list and you will find that command listed there. Add it to the QAT.
 
Just right-click near the top of the form and you will get options including CLOSE.
 
That actually closes the application, not the object.

Sorry, but you are wrong there vbaInet. If you select the right place in the form you get this:

attachment.php
 

Attachments

  • a2k7closeform.png
    a2k7closeform.png
    42.3 KB · Views: 4,894
I initially thought this was what DCrake was referring to but it isn't. This is how you replicate the "problem":

1. In the Current Database section of Access Options, untick the 'Display Document Tabs' check box and OK that.
2. As you know, close your db and open it again.
3. Open a form in design view and try to close it.

I wouldn't have known if DCrake didn't spot this.
 
I initially thought this was what DCrake was referring to but it isn't. This is how you replicate the "problem":

1. In the Current Database section of Access Options, untick the 'Display Document Tabs' check box and OK that.
2. As you know, close your db and open it again.
3. Open a form in design view and try to close it.

I wouldn't have known if DCrake didn't spot this.

Still works fine for me. It closes the form not the app.:

attachment.php
 

Attachments

  • a2k7closeform2.png
    a2k7closeform2.png
    39.2 KB · Views: 4,792
Okay, no close in design view. So, my workaround has been to go to layout view and then close. But I agree that should not have to be done.
 
Yes, that was what DCrake was talking about which was I suggested adding the close button to the QAT.

It's silly isn't it! They must have their reasons or it was an oversight.
 
Probably an oversight.
 
Investigated further and I realised only way to get the close option is to go from design mode to view mode then the short cut menu offers me the option to close. However this sometimes causes errors due to on load events.
 
Investigated further and I realised only way to get the close option is to go from design mode to view mode then the short cut menu offers me the option to close. However this sometimes causes errors due to on load events.

Try going to LAYOUT view instead of Form VIEW.
 
This works fine for me both in Design and Form view (except when its a pop-up form obviously). Is it definitely the "Close Window" button you added to the QAT or the "Close" button David? There are a few of these.
 

Users who are viewing this thread

Back
Top Bottom