Microsoft Access - Inserting Line Breaks When Entering Data (Access 97/2000/2002)


We recently told you how to customize the way in which Access reacts to the [Enter] key during form navigation. As a refresher, you can control whether pressing [Enter] moves focus to the next control, next record, or does nothing at all. There's another task you're no doubt used to performing with the [Enter] key--inserting line breaks in text.


You may rarely need to insert line breaks when working with textbox controls that are bound to text fields, since all fields should be dedicated to storing discrete information. However, some situations can warrant line breaks. When you need to insert a line break only occasionally, you can do so by pressing [Ctrl][Enter]. This technique can also be used for things like inserting line breaks in label Caption properties.


If line breaks are frequently entered in a textbox control, you can configure the control to override Access's navigation behavior and add a line break when just the [Enter] key is pressed. To do so, set the control's Enter Key Behavior property to New Line In Field. This is actually the default property setting that's assigned when you add a textbox control that's bound to a memo field.

Go back