Hi,
Is there a method to tab to the next control on a form in tabindex order i.e. set the focus to the next control without specifying it by name?
Printable View
Hi,
Is there a method to tab to the next control on a form in tabindex order i.e. set the focus to the next control without specifying it by name?
Something like SendKeys.Send({TAB})?
There's probably a better way.
You could iterate through the controls, see which one has the focus, then set the focus to the control with the next tabindex, but that sounds like more work.
Hi Salvelinus,
Many thanks, You have put me on the right track, I can include the tabindex number in the parameters forwarded by the last accessed control!!!
Hi,
I am using a form derived from a base form. The Derived form has extra controls. Although I can record the tab index of the control currently in focus, when I try to set focus on the next tabindex number I can't. I get an error message to the effect that the tabindex number I require is "Out of Range" When I look further into this, I find that the programme is taking into account the number of controls on the Base form, not the derived one.
Another wierd thing is that when I try to reference the control in the Instance name (the form was instanced in another form) I cannot rebuild the project as I am told the Instance name has not been declared. I can only get round this by creating the instance in the general section of the Module (not any of the forms, even if declared Public.)
Anyone any comments?