Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 935
  • Last Modified:

Text box: Pressing enter does not go to new record

I have a very simple form (subform) where users enter information into a text box. It is a continuous form so that users can see several records at a time. I had one user call to say that all of the information he entered yesterday is now missing. After I checked into it, all of his data is there. However, when entering the data, he was pressing the enter key and expected it to start a new record. I would have assumed the same. Instead, all of the data has been entered into a single record. Pressing enter simply wrapped the data within the text box. In case it helps, I have attached an image of the subform.subform
0
Dale Logan
Asked:
Dale Logan
1 Solution
 
Rey Obrero (Capricorn1)Commented:
check the "Enter Key Behaviour" property of the textbox
make sure it is not set to  "New Line In Field"
0
 
Jeffrey CoachmanCommented:
This is controlled in the properties of the control:
Enter Key behavior:  Default
Will keep you in that field

<However, when entering the data, he was pressing the enter key and expected it to start a new record. >
If the control is the last control in the tab order, sure...
But what if it is the first or third control in the tab order?

Use the Tab to move through the fields.
Use: Ctrl+
...to move to a new record

JeffCoachman
0
 
Ess KayEntrapenuerCommented:
Add a button for next record
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
Dale LoganConsultantAuthor Commented:
I sure wish that wasn't the default. It seems to me the more common action would be to exit that control. Thanks for the help.
0
 
Jeffrey CoachmanCommented:
Again, the origins of this functionality go way back to the days of typewriters and GreenBar paper.

The Enter key has always been the default to move to the next *Line*...
When you press Enter in Excel , you move to the next line/Row
When you press Enter in Word, you move to the next Line
When you press Enter in PowerPoint, you move to the next Line.
When you press Enter in Outlook, you move to the next Line.
When you press Enter in NotePad, you move to the next Line.
When you press Enter in SQL Server, you move to the next Line.
...etc
Why would you want the default in Access to do something that 90% of all application Don't do?

(Because typical Data fields rarely need to wrap, the default enter Key behavior in Access is to stay in the field)

But to be 100% fair, you can change this in the Access Advanced Options:
    Move After Enter: Next Field

But remember Tab has always been the default in most programs to move to the next Field/column
In Excel tab moves you to the next Column
In Excel tab moves you to the next Tab stop of Column in a table.
...etc


Again, Just FYI

JeffCoachman
0
 
Dale LoganConsultantAuthor Commented:
One of the very first things I do with a new computer or new Access software is to change the default Enter key behavior to go to the next record. Maybe that's why I was thrown off. I never experience it doing anything else.

However, I certainly would not expect pressing enter to stay in the same field. I would expect it to either go to the next field in the same record or to the next row...similar to what it does when you're in a table. I can't believe I've never noticed this before.
0
 
Jeffrey CoachmanCommented:
OK, did you see how to change this in the Access advanced options...?
0
 
Dale LoganConsultantAuthor Commented:
Sure. That's what I was referring to as the first thing I do.
0
 
Jeffrey CoachmanCommented:
ok...
;-)
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now