controlling the cursor action

G

Gator

I have a datasheet on a form that I will be entering numbers on from my
keypad. Each time i enter a number, I hit the Enter button on the keypad to
enter a new number. By default the cursor moves left. I don't want to
change the default...I just want that action when I'm in the datasheet. Can
I code this somehow?
 
L

Lord Kelvan

well there is some code you can add to each control


If KeyCode = 13 Then
KeyCode = vbKeyDown
End If

and put this code on the key down properity of each control in the
datasheet form alternativally you can go into tools options and then
set under the keyboard tab move after enter properity to next record
as a note either method will not when you are at the end go to the top
of the next column of the datasheet view.

i hope this helps

you will also see under the key bords tab other useful things

if you only want this dow functionality with this one form and not
every data sheet in access then use the key down code i provided
otherwise change the default option.

Regards
Kelvan
 
G

Gator

What event do I associate the code with? I don't do a whole lot in the
subform datasheet but I do some data entry in it and usually it will be
entering numbers in a field so while I'm entering numbers in a cell from my
keypad, it is more convenient to push the Enter button instead of using the
arrow key or the mouse. thanks
 
L

Lord Kelvan

i said the key down event on each text box where you enter numbers

so for every text box where you enter a number add the code

If KeyCode = 13 Then
KeyCode = vbKeyDown
End If

on the keydown event

Regards
Kelvan
 

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