I have a form with a couple of DBEdits, DBMemos and other DB controls. It is an edit form with a button which posts the changes to the edited record.
In OnKeyPress event I have the code to deal with Enter:
if(Key = #13) then
Key := #0;
Perform(WM_NEXTDLGCTL, 0, 0);
When Enter key is pressed on any DB control different than DBEdit the FormKeyPress is called and the next control is focused, but when the Enter is pressed on any of DBEdit controls the OnClick event of my button is called and I'm not able to say why it happens.