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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shift+Tab 2

Status
Not open for further replies.

Nitrous270

Technical User
Jul 27, 2002
67
0
0
US
There are a few places on my form that i had to manually set the focus using VB how can i do the same using Shift+Tab to make the focus go backwards?

Thanks,
Nitrous270
 
Hold down the Shift key and press the Tab key.

Just kidding. Your question isn't clear enough to give an answer. When you say "manually set the focus using VB" I assume you mean you're calling the SetFocus method, but you can use that to focus any control, so asking how to go backward doesn't seem to make sense.

It could be that you "manually set the focus using VB" by using SendKeys to send a {Tab} keystroke, but I hope you didn't. SendKeys should only be used as a last resort, because you can't be certain that the keystroke will go where you meant it to. It could even be read by another application entirely--I've had it happen--and that could be disastrous for your user. You should definitely be using SetFocus.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Actually RickSpr was right; holding down the Shift key and pressing the Tab key will cause the focus to go back to the previous field, just like in any other Windows program.No extra effort is necessary on your part.

The Missinglinq

"It's got to be the going,
not the getting there that's good!"
-Harry Chapin
 
Okay well I have some subforms in which I try and use Shift+Tab on some fields that will not go back to the main form.

Hopefully this clarifies,
Nitrous270
 
What you need is Ctrl+Shift+Tab. For additional keyboard shortcuts, see "keyboard shortcuts" (submenu "Use shortcut keys in Microsoft Access") in the help file. Click the button for "Use shortcut keys to navigate in Form view."

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top