HElP with On-Key-Down please

S

Shadow

I've assigned a simple precedure in a form's On Key Down event.

No matter which keys on my keyboard is pressed, the event is not trigerred.
Nothing happens when I press a key.

Is there anything I'm missing? The following is my code.

Thanks for any kind of advice.



Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

if keycode=38 then Docmd.OpenForm "frmTest"

End Sub
 
T

TC

You must set the form's KeyPreview property to True.

P.S. Please don't post in HTML!

HTH,
TC
 

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