Option group item selection by keystroke

C

CarlRSr

In Access 2003, I have a simple Yes/No two-button option group. I want to be
able to use the 'Y' or 'N' keys to select the option rather than mouse. The
group is bound to a query field. If I use use &Y and &N, and the field in
the table is empty, nothing happens when I press the Y or N keys. If there
is already data in the field, it jumps to the next option group, and stores
the value in that next field, leaving the desired field empty, and the option
buttons grayed out.
Is there a good way to do key selection of option group items?

Thanks
 
M

Mr B

CarlRSr,

I have not attempted to make any selection from a group control using a Y or
an N so I can't give you the direct answer to the question you asked.
However, I am not sure that this will help but here is one solution that I
have tested an know it will work for you but it is a way to make selections
from a group control using the keyboard.

When you have tabed to the group control the fucus will automatically be set
to the first option. If you want to select the first option just press the
space bar. You can also use the arrow keys to move between the options. As
you move between the options to option to which you move the focus will be
the selected option. You can then tab on to the next control and your
selected value for the group control will be saved to the field to which the
group control is linked.
 
J

John W. Vinson

In Access 2003, I have a simple Yes/No two-button option group. I want to be
able to use the 'Y' or 'N' keys to select the option rather than mouse. The
group is bound to a query field. If I use use &Y and &N, and the field in
the table is empty, nothing happens when I press the Y or N keys. If there
is already data in the field, it jumps to the next option group, and stores
the value in that next field, leaving the desired field empty, and the option
buttons grayed out.
Is there a good way to do key selection of option group items?

Thanks

You can get the same effect by using a Combo Box with Y and N as the displayed
values, -1 and 0 as the bound column. Is the option group appearance critical,
or would a combo showing Y and N be acceptable?

To get the effect use the settings:

Control Source: (the yes/no field in your table)
RowSourceType: Value List
RowSource: "Y";-1;"N";0
ColumnCount: 2
ColumnWidths: 0.125";0"
Bound Column: 2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top