The NavigationControl (Tabs) does not show in an Access 2016 database, only for some users, after the first tab has been selected.
We have 19 users, all running Windows 7 Professional Service Pack 1 and MS-Access 2016 Runtime. The database contains a central Navigation Form with 8 tabs in the Horizontal Tabs layout, forming a bar above the navigation sub-form. 17 users have no problem with the database, but 3 users have the following problem:
After logging in to the database, the Navigation Form is presented, complete with horizontal tabs for selection. Once a selection has been made (does not matter which tab) the appropriate form is correctly displayed, but the NavigationControl (Tab Bar) disappears.
I have checked all of the users' screen resolutions. There is no correlation with the problem. I have 2 users, both with 1920x1080 resolution; one has the problem and one does not.
I have scoured all the forums, including this one, but I cannot find anything similar.
I tried using VBA in the Navigation Form's Current as follows:
With Me!NavigationControl0
.Visible = True
.Height = 1.032
.Width = 43.817
.Top = 0
.Left = 0
.HorizontalAnchor = acHorizontalAnchorBoth
.VerticalAnchor = acVerticalAnchorBoth
End With
The problem persists. Has anyone witnessed this and come up with a solution?
TDP - User with problem logged on to my machine (known good) with no issues. Conversely, I logged on to his machine; problem remained. Problem is machine-specific.
Edit 07 Jun 18
I found that one affected user had two versions of the runtime installed (2010 and 2016) and that the file association was with 2010. I uninstalled the 2010 version and re-associated the database with 2016. It did not cure it.
I also found that my statement that all tabs were affected was incorrect. Two of the tabs show forms that are in what I think is a datasheet view, i.e. displaying a table layout. The NavigationControl (tabs) displays correctly for these. The other tabs are the traditional Form View and the NavigationControl for these disappears.
For each tab, in the Enter event, is DoCmd.SetWarnings False. Nothing else.
For the two affected tabs there is code under the Click event:
Private Sub NavigationButton9_Click() ' Enquiry Form
DoCmd.BrowseTo acBrowseToForm, "Enquiry", "Navigation Form.NavigationSubform", , , acFormEdit
Me.[NavigationSubform].SetFocus
Forms![Navigation Form]![NavigationSubform].Form.FilterOn = False
DoCmd.GoToRecord , , acNewRec
End Sub
It is the only difference I can find but I cannot see what would invoke the NavigationControl to disappear.
BTW: The Navigation Control itself has no events assigned in any of the categories (Macro, Expression or Code)
Edit 2 - 07 Jun 18.
I added a button to the Navigation Form header and used its Click event to display a message box listing the Visibility, Height, Width, Top, Left, H Anchor, V Anchor, Span, Display When and Enabled variables for the NavigationControl. Even with the NavigationControl missing all the variables are OK.
It seems, from relative positioning on the screen, that the sub-form is moving upwards. Could it be that it is lying over the front of the NavigationControl, obscuring it?
Edit 3 - 07 Jun 18.
Monitored the .Top variable of the NavigationSubForm. The value is the same, regardless of whether the tabs are there or not; yet the sub-form (or form?) has physically moved upwards (I guess, to obscure the tags).
Related
Using MSAccess 2016 64 bit with SQL SERVER Express 2014 backend.
I have a form "frm_Navigation" with a subform control "NavigationSubform" and a Navigation control.
There are several forms for different tasks within the database that are loaded into the NavigationSubform by clicking the buttons on the Navigation control.
Some of the navigation is managed from the Navigation Control, but some is initiated from a subform. When the user clicks a button on the control, it appears "pressed", but when I navigate using the following, I am not able to make the button appear pressed without changing the colour on the button.
This is how I am currently navigation from a subform:
Form_frm_Navigation.NavigationSubform.SourceObject = "frm_SearchResults"
Form_frm_Navigation.lbl_Header.Caption = "Search Results"
I have read the following posts, but sadly I'm not able to accomplish what I am trying to do
https://blogs.office.com/2010/02/23/access-2010-browseto-docmd-and-macro-action/
http://www.utteraccess.com/forum/index.php?showtopic=1986422
navigating to a different tab in navigation subform
Opening subform within navigations (ELI5)
Main form: frm_Navigation
subform Control on Main from: NavigationSubform
Subform containing code: frm_Search
Form I am trying to open: frm_SearchResults
DoCmd.BrowseTo acBrowseToForm, "frm_SearchResults", "frm_Navigation.NavigationSubform"
Error '2046': The command or action "BrowseTo" isn't available now.
Expected outcome: frm_Search is loaded in the subform control of frm_Navigation by default. After the user enters criteria in the search fields on the frm_Search and clicks btn_search the results are populated into a table, then the frm_SearchResults is opened to display the found records.
I have tried setting the focus to the Main form first, clearing the source of the NavigationSubform, setting the source of the NavigationSubform to the form I am trying to open (I read somewhere that the form must be open) and several permutations of the BrowseTo arguments.
EDIT 2016-07-04 16:04 GMT
It works now as long as the Navigation form is first closed, then reopened. It is not elegant, but the Navigation button now lights up to indicate which is "selected".
Excerpt of code in "frm_Search", a subform of "frm_Navigation" occupying the "frm_Navigation.NavigationSubform"
Is there a way to achieve this without closing the navigation form?
DoCmd.Close
DoCmd.OpenForm "frm_Navigation"
DoCmd.BrowseTo acBrowseToForm, "frm_SearchResults", "frm_Navigation.NavigationSubform"
I have a List view (parent), and inside of that I have a sub view that is a blank view which contains some input boxes. I also have Next/Previous buttons in the parent that use GoToRecord to navigate to the next/previous records.
If I enter some data into the subview and try to navigate away using the Next/Previous buttons, I recieve an error asking me to Save, Discard or Edit my inputs in the subview (which is fine). However, if I:
click Save: It goes to the next record (expected) but the controls on the next record do not work
click Discard: Same as above - that is, it goes to the next record but none of the controls work
click Continue Editing: It jumps to the next record and populates the subview with the data from the previous record.
Why am I encountering these issues? Is this a product issue?
Yes, this seems to be a product issue. I believe this is essentially the same type of underlying product issue you identified in your earlier post here:
MS-Access 2013 Web Apps - Why does GoToRecord break when the view contains a subview?
I talked with the product team and they are looking into this. Access seems to be swallowing the custom Action Bar buttons in this scenario with a main and Subview.
Step1: I open an Access form when the software opens. It acts like a switchboard manager where the user can open other forms and reports. (Popup = yes, modal = no)
Step2: Click to open a "Master Form" which also has other options. (ditto) So the original VB code called this form to be open and is still "running" in the background.
Step 3: Click to open a report based on the record selected.
So now there's 2 forms open and 1 report. User cannot toggle between them, must close one to get to the other (necessary).
On the open report, I would like to modify the rightclick commandbar. However, "Close" doesn't work because Access now shows Form1 and Form2 above as gray and Access is locked. I would like to be able to right-click to do a number of things including Close, Change to Design View, etc. But if I'm locked out like this, none of these will work.
I searched on...
1. Ending the background vba that's running - no luck
2. Setting focus on the active screen name - no luck
3. Setting focus on a control on the Form2 above - no luck
4. Tried all kinds of CommandBar things, no luck (ID choice vs. manual OnAction) and many more
I'd be happy to attach what I'm doing but it's pretty big, although I could probably cut out the sections that this applies too...
I've been searching for about 16 hours now... Anyone???
Thanks so much.
Popup = Yes in Access means two things:
The form or report stays above all other forms and reports that have Popup = No and above Access’ application window.
The form or report is not bound to the area of Access' application window and can be drawn outside of it.
You have two options:
Set Popup = No for the two forms. In this case they will be tied to the application window area.
Set Popup = Yes for the report as well, so that it can stand in front of the two forms.
I have an Access db (developed in Access 2007) set to display windows in tabbed view. It opens with a simple form to show the user various options. Since I made it, we upgraded to Access 2010.
Since this form was made for navigation to other forms (there is no underlying data set), it just has buttons in the Form Header that open other forms. Here's sample code from one of those buttons:
Private Sub Cmd_Lookup_Click()
DoCmd.OpenForm "Frm7a_Lookup"
End Sub
However, when these buttons are clicked, a dotted rectangle (about 1-2 inches in length and width) appears in the upper left of the form while the new form is loading. I have no idea where this 'phantom box' is coming from. There's no object in that area of the form and all the other objects in the form are visible and accounted for. So, there's nothing for me to delete.
It's visually unappealing and shouldn't exist. How do I make this phantom box go away? Do I have to rebuild the form from scratch?
The phantom boxes seem to appear when buttons (perhaps with pictures) from previous versions are on the form.
Try removing the buttons and re-adding them.
I want to write some VBA script so that when I start my access application the main window is blank. This is the list of things I need to be removed or hidden:
The entire ribbon
The status bar
The navigation pane
The window tabs
In addition, I want to disable the popup menu when right clicking.
I also want to disable SHIFT bypass key startup.
I basically want it to look like an application created with VB or C#.
Only if I login as admin will the disabled options be bypassed.
Does it need to be VBA? Why not using the normal Access Application Options?
In Access 2010 you can find them via File > Options > Current Database. Almost all the things you want can just be unchecked - see the following screenshot. The options you select there are saved with your database.
You can start the database while holding SHIFT which will override these start up options and show you your "normal" ribbon, status bar, navigation bar, ...
Try the following in startup function
This should do what you want
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.ShowToolbar "Status Bar", acToolbarNo
Might work with other MS Access windows elements, I just wanted to not display the parts above.
Old thread but still useful information. Here's what I do:
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.ShowToolbar "Status Bar", acToolbarNo
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
Put that code in a Public Sub called from a macro called AutoExec.
Disabling Window Tabs and the Shift Bypass are trickier because these need to be done by setting the database property, either through the database Properties or by appending a property with CreateProperty. Also, you need to exit and reopen the database for these changes to take effect.
I found instructions over on techrepublic and Allen Browne has more complete instructions on his website.
Actually, as noted, you can use the startup options to remove most all of the questions you have in terms of popups, the tabs etc.
To hide ribbon, qat, just use:
DoCmd.ShowToolbar "Ribbon", acToolbarNo
So, with the options setup correct and ONE line of code, you only see your form.
Here is an resulting screen shot of using the above one line of code and options to turn off tabs (you want tabbed windows, but tabs turned off). Note how you see the windows desktop. this was all done with one line of code as per above: