can i press enter to check a check box in access

G

Guest

I have three check boxes, and I want to make it easy on the person using it,
so that when she tabs through the check boxes, can she hit enter to check the
box, and then tab on, instead of using the mouse click to check the box???
thx
jimmy
 
F

fredg

I have three check boxes, and I want to make it easy on the person using it,
so that when she tabs through the check boxes, can she hit enter to check the
box, and then tab on, instead of using the mouse click to check the box???
thx
jimmy

Use the space bar to toggle the check box value true or false, not the
Enter key.
 
G

Guest

You can use the KeyDown event of the field to check which key is pressed, and
change the value if the enter key is pressed

Private Sub FieldName_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Me.FieldName = Not Me.FieldName
End If

End Sub
 

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