HElP with On-Key-Down please

  • Thread starter Thread starter Shadow
  • Start date Start date
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
 
You must set the form's KeyPreview property to True.

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

HTH,
TC
 
Back
Top