Is the best way to move thefocus automatically between controls by setting up a control array and incrementing the index after each control has had it's data validated?
You could also use the SendKeys "{TAB}" or SendKeys "+{TAB}" in the validate event. You will need to have the TabIndex of each control set in the order that you want.
And then you could create a method, calling it from the Validation event, that gets passed the active control's name and do a SELECT CASE:
Sub MoveFocus(ActiveControlName as String)
Select CAse ActiveControlName
Case "Text1"
Text2.SetFocus
End Select
End Sub [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.