Trapping Return in keypress()

  • Thread starter Thread starter dwetmore
  • Start date Start date
D

dwetmore

In a textbox or combobox how do I get the "On Keypress" event to
detect a return. The code "If KeyAscii = vbKeyReturn" doesn't work (at
least for me.)

Thanks

Dave Wemore
 
If KeyAscii = 13 Then

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 
Hi Dave,
--use KeyCode instead of KeyAscii
--use it on the keydown event, not the keypress event

Jeanette Cunningham
 
Back
Top