How to Tab Through Options in an Option Group?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have survey which uses an option group for each question. Pressing the
<Tab> key moves the focus to the next option group, but I want the tab to
jump to the next option in the same group. After tabbing through all the
options in the group, I want the tab to jump to the next group and move
through those options.

How do I tab through options in an option group?

Daniel
 
It would be much better to use the arrow keys to move items within the
option group, and the tab key to move control.

If you want to confuse everyone with a non-standard interface, it should be
possible to use the KeyDown event of the control to trap the keystroke
(vbKeyTab), destroy it (set KeyCode to zero), and alter the Value of the
option group instead. To set the value, you would need to loop through the
option group's Controls collection, ignore any where the ControlType is not
acOptionGroup, figure out which one is the next one based on its
OptionValue, and then set the Value of the group to that number.
 
Thanks for your help, Allen.

Allen Browne said:
It would be much better to use the arrow keys to move items within the
option group, and the tab key to move control.

If you want to confuse everyone with a non-standard interface, it should be
possible to use the KeyDown event of the control to trap the keystroke
(vbKeyTab), destroy it (set KeyCode to zero), and alter the Value of the
option group instead. To set the value, you would need to loop through the
option group's Controls collection, ignore any where the ControlType is not
acOptionGroup, figure out which one is the next one based on its
OptionValue, and then set the Value of the group to that number.
 
Back
Top