?
Solved

Textbox contained within a frame taking focus

Posted on 2011-10-14
2
Medium Priority
?
194 Views
Last Modified: 2012-08-14
I have a VB form containing Textboxes both on the form and with a frame on the form.  The textboxes on the outside on the form follow the tab order set but after entering information in the last textbox outside the frame I want the next textbox within the frame to take the focus and it won't. even though I have code in the last textbox outside the frame to have the first textbox within the frame take the focus.
0
Comment
Question by:DavidH7470
2 Comments
 
LVL 11

Expert Comment

by:ScriptAddict
ID: 36969589
Is the frame a different object model?
0
 
LVL 31

Accepted Solution

by:
gowflow earned 2000 total points
ID: 36969733
you need to set the tabindex property as follows
say you have
frame1
contains textbox1 textbox2 textbox3
frame2
contains textbox4 textbox5 textbox6
and on the form
textbox7 texbox8

and if you need them in the following sequence you will need to set their tabindex property as follows
Seq   control         tabindex
0       textbox7            0
1       textbox8            1
2       frame1              2
3       textbox1            0
4       textbox2           1
5       textbox3           2
6       frame2             3
7       textbox4          0
8       textbox5          1
9       textbox6          2

You don't need to set focus on any item when you hit tab or enter in a textbox it will move to the next items

gowflow
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question