1

Is it possible to add line breaks to a Microsoft Access cell? If I want to save some text like this:

"text text text text text text text 
text text text text text text text 
      text text text text text text"

Would it be possible? Or can it only be saved as one line?

TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

1

You can certainly add line breaks in Microsoft Access.

To add a line break in a text box, use Ctrl + Enter.

To add a line break using SQL, add the Chr function:

INSERT Into MyTable(MyTextField)
SELECT "text text text text text text text" & Chr(13) & Chr(10) & 
"text text text text text text text"  & Chr(13) & Chr(10) & 
"      text text text text text text"

Chr(10) is the line feed character. Chr(13) is the carriage return character. Generally, in Windows, you make a new line by using a character return and a line feed (like you would in a type machine), but some operating systems use one (see this answer for more details).

Erik A
  • 31,639
  • 12
  • 42
  • 67