Navigation off of tab control

L

Laurel

I have a window with search fields at the top and a tab control with a
number of tabpages at the bottom. Is there a way to use the keyboard to get
from a tabpage back up to the search fields?
 
V

Van T. Dinh

From a TextBox on one of the Tab Pages, I have to use:

Shift + Tab to set the Focus to a Tab Page and not the TextBox Control
Shift + Tab to set the Focus to the Control just before the TabControl.

If you use it often, set the Form's KeyPreview to Yes/True and use the
Form_KeyDown (?) Event to check for the selected shortcut key to move the
Focus as required.
 
L

Laurel

I think the idea of a hot key is the way I'll want to go. Can you tell me
how to reference specific keys in a script? (i.e., test for whether a key
has been pressed?) Or point to the location in Help? I'm afraid I find VB
help not always helpful. Some of the most critical info is buried and not
indexed.
 
V

Van T. Dinh

Check Access VB Help on the KeyPreview Property of the Form and the KeyDown
Event of the Form. The sample code is nearly what you want.
 
L

Laurel

Great. All is working well. Thanks!

Van T. Dinh said:
Check Access VB Help on the KeyPreview Property of the Form and the KeyDown
Event of the Form. The sample code is nearly what you want.
 

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