Can you put a hard return in an Access 2007 cell?

T

Tammy

I just started using Office 2007. Is there a way to put a hard return in an
Access cell? I know it can be done in Excel.
 
D

Dirk Goldgar

Tammy said:
I just started using Office 2007. Is there a way to put a hard return in
an
Access cell? I know it can be done in Excel.


Well, Access doesn't really have "cells" as such, but I know what you mean.

In a datasheet, you can enter a hard return by pressing Ctrl+Enter. In a
text box on a form, there's a property of the control that determines
whether simply pressing Enter is enough to enter a hard return, or whether
you need to press Ctrl+Enter. The property is named "Enter Key Behavior",
and you'll find it on the Other tab of the control's property sheet.
 
A

Arvin Meyer [MVP]

Tammy said:
I just started using Office 2007. Is there a way to put a hard return in
an
Access cell? I know it can be done in Excel.

Yes, use Ctrl+Enter from the keyboard
or:
vbCrLf in VBA code
or:
Chr(13) & Chr(10) in SQL

Characters entered from the keyboard will be truncated to the last real
value, so a simple space or return without a following character will be
trimmed.
 
J

John W. Vinson

Excel: Alt+Enter
Access: Ctrl+Enter
Word/PPT: Shift+Enter (Soft return)

Don't you just love software that's consistant across applications... <sigh>
 
D

David W. Fenton

I don't use PPT, but in Word, in the analogous context, i.e., in a
table cell, you just hit ENTER to get a hard return. The soft return
is a completely different animal and has no analogue in Word or
Excel.
Don't you just love software that's consistant across
applications... <sigh>

In Excel, Ctrl-Enter saves the typed value in the cell, but doesn't
move to the next cell (as defined by the default action, down or
across). If the default move on ENTER is not defined, nothing
happens.

Shift-Enter reverses the default action 180 degrees, i.e., if you
define it to move right on ENTER, Shift-Enter moves LEFT, and if
you've defined it to move down, it moves UP.

In Word, Ctrl-Enter creates a page break. Alt-Enter does nothing.

So far as I can tell, in Access only Ctrl-Enter has a default
behavior.

Ctrl-Enter is certainly the logical choice to my way of thinking, as
Alt- by itself should be reserved for menu activation (in my
opinion), which means I see the Excel approach as completely wrong,
and Shift-Enter has no obvious meaning, as the only context in which
I've ever used it is in Word, and the context in which you use it
has no analogue in Word or Access.

Foolish consistency can be just as bad as inconsistency, and in this
case, it seems to me that the apps have been designed for the people
who are going to be using just the one app.

Of course, in Access, it's easy enough to redefine the behavior if
you'd like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top