teelee said:
I am still having trouble with this..I have a tab page and I need
after I enter the info for the last text box in the first page I need
the tab to go to the next tab page. i ws told to do it this way In
the LostFocus event of the last text box on the first page, set focus
to the first text box of the second page. I keep getting an error
message. Can somwone please help me with this.
Thanks
I don't recommend using the LostFocus method because it means that any time the
user leaves that control (even with their mouse) that they MUST go to the next
control on the next TabPage. If they were using Shift-Tab or the mouse this
will take them someplace other than where they wanted to go and they will mutter
about the dufus that designed the app.
Instead, place a tiny (but visible = true) TextBox on each TabPage and make it
last in the Tab Order In the GotFocus event of that control have code that
takes you to the desired control on the next TabPage. The code would look
like...
Me!DesiredControlName.SetFocus
This TextBox can be zero pixels high and wide so it cannot be "seen", but it
must have its visible property set to true so it can have focus (albeit
temporarily).
This way when the user leaves the last "real" control on each page by using the
Tab or Enter key then they will automatically be taken to the next TabPage, but
if they use Shift-Tab or the mouse then those actions behave as expected.
By the way...what is the error you are getting?