Solved Refreshing pressed color on navigation tabs after executing BrowseTo to navigate between tabs

autumnnew

Member
Local time
Today, 06:38
Joined
Feb 4, 2013
Messages
44
Does anyone know of a way to refresh the tab colors of a navigation control after using code to navigate to another tab?

I have code that switches to the first tab of a navigation subcontrol on my main form, but the pressed color on the previously selected tab and current tab do not refresh unless I mouse over them. Even though right tab opens correctly, the button colors don't change and it looks like previous tab is still selected/pressed. Here is the code I used:

DoCmd.BrowseTo acBrowseToForm, "NavigationTargetNameofTab1", "MainForm.NavigationSubControlName"
 
can you setFocus to the associate Navigation Button?
 
Oh, derp. Yes! That fixed half the problem. Me!tabNameofTab1.SetFocus Now the color is right for the pressed button, but now how can I 'unpress' or refresh the tab of previously selected tab? I guess one workaround could be I could cycle through all the tabs and setfocus to each one at a time, but I'm sure there's something simpler than that...
 
i don't know why the "previous" tab appears as if it is selected when you issue BrowseTo command.
can you try to Refresh the Form (Me.Refresh), after BrowsingTo?
 
Yep. That's all it needed, was Me.Refresh. 🤦‍♀️I deleted the setfocus line. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom