Navigation Control - How to Set the Highlighted Tab

P

paul

I have developed a form with a table driven navigation control.
Meaning based on other dat entry by the user on the form, the
navigation control will layout appropriate options. So, if the user
picks customer view, for instance, the navigation control will give
customer specific optiosn. If the user picks vendor view, then the
navigation control will show vendor specific options.

Based on the users choices, I have also defined in the table the
default tab that I want displayed when they go into a particular
view. I want the corresponding button on the navigation control to be
"selected". I have it so the subform is filling with the appropriate
value like the button was pushed but the button that is highlighted
and darker like it was pushed is a different button. It is the last
button on the navcontrol that the user did push.

How can I specify which button on the navigation control I want to be
"pushed".

I have found the selecteditem property of the navcontrol but it is
readonly so I can't set it. Any ideas?
 
P

paul

I got a solution. Kind of kludgy but it seems to work.

I set the focus to the appropriate button (forms![formname]!
[navigationbuttonname].setfocus) then do the sendkeys "{Enter}" to
"press" that button.

This seems to work. Not crazy about using sendkeys so if someone has
a vay to set the value of the navcontrol or something, let me know but
this at least is a solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top