Prevent move next on Enter
- From: "Jesper Fjølner" <jf>
- Date: Wed, 13 Apr 2005 17:43:09 +0200
I'm using the folto prevent users from 'tabbing' out of a field.
Private Sub ControlName_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab And Shift = 0 Then
KeyCode = 0
End If
End Sub
Can I do the same for the Enter-button?
If KeyCode = vbKeyReturn Then
KeyCode =0
End if
doesn't seem to work?
In the database options I've set the database to move to the next field on
Enter - does this complicate it?
Could it be something with the previewing of the keystrokes in field/form?
Thanks for your help.
--
Jesper Fjølner
Denmark
.
- Follow-Ups:
- Re: Prevent move next on Enter
- From: Jesper Fjølner
- Re: Prevent move next on Enter
- Prev by Date: Troubleshooting Techniques
- Next by Date: Comboboxes and validation rules
- Previous by thread: Troubleshooting Techniques
- Next by thread: Re: Prevent move next on Enter
- Index(es):