Turn on the form's KeyPreview property, and in control's KeyPress check the key that was pressed. If it's what you want to disregard, issue NODEFAULT.
I gotta ask, though, why? Most people are really familiar with text editors and/or word processors and pretty much expect the enter key to bring a new line. Changing that expectation seems a mighty up-hill battle.
Hi Dan,
I also had no use for this until I built a form for creating a report with 6 x images per page and a caption for each image.
I just want the caption to be 2-300 Char long in a edit box with no scroll bars, where the max length property allows the control to be filled up just nicely.
By allowing the user to enter new lines, the text will drop off the bottom.
The caption text on the report form will be fixed - no stretching allowed.
Alastair
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.