Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make tab/menu option pressed in 2010 Nav Control

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I seem unable to make a particular tab / menu option the current 'pressed' option.

I found this :
But I don't understand what Albert is talking about. What on earth is 'Navigation=20.Form.....' ?

I have a navigation control called 'NavigationControl123' , the associated form name is 'Nav_Form' , I have 4 menu options (tabs).

'Dummy', 'Add_Call' , 'View_Fees' , 'Send_Email'

When 'Add_Call' is pressed it is highlighted and all is great, I load the desired objectsource for the associated form (Nav_Subform).

However, when I want the nav form to disapear, I hide it , fine, but the 'Add_Call' option is still highlighted, ok I can use VBA to changed the 'Pressed' colour, but then the hover effect doesn't work, as Access still has that menu option set as 'Pressed'.

How do I unpress it?

How do I 'press' the 'Dummy' menu option, so the focus / pressed effect will go away from the 'Add_Call' menu option and the hover effect will work again?

Thanks,
1DMF.

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
OK, I worked it out!

Code:
DoCmd.BrowseTo acBrowseToForm, "Dummy", "Communications_Progress.Nav_Subform"

However, there are caveats!

You have to use the the 'Navigation Target Name' property and assign the menu option to a particular form (which was a pain as I was dynamically assigning the ObjectSource via VBA!)

That also meant I had to create a blank 'Dummy' form to assign to the 'Dummy' menu option.

So I now have a menu option you can't see which is a dummy menu option assigned to a blank dummy form. I then use the BrowseTo command to navigate to the 'Dummy' form, which will then make Access correctly focus away from the current menu option allowing for the click / pressed and hover effects to work again.

Bit of a palaver, but it works!

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top