Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returns in text boxes

Status
Not open for further replies.

Danielle17

Technical User
Apr 17, 2001
102
US
Is it possible that when you press enter in a text box it would jump to the next line in that same test box...in the text boxes on one of my forms I have a box that i fill with a list of equipment. I'd rather not have all of this run on into a paragraph. If I use control-enter it'll work but I was wondering if there was code. TFAH
 
If you have a field setup that you list items in then it is violating the First Normal Form. These should be separated out into their own table.
 
I agree with Jerry, that is the best way.

Although I have found the 'onkey event' useful. This can run on a form level or a text box level (not sure which is serviced first). When a key is pressed a number is passed into the subroutine (normal ascII stuff). Simply do a case statement to filter out the actions you want. You could then modify the the actions in the text box to do almost anything. If you want to cancel the key action then set 'key = 0' (I think that is correct) and the normal access action will not execute.

Anyway just to finish where I started, getting the database structure correct first can save alot of playing around with processes I have just described, and make the data more flexible, searchable and printable. Long text fields can encourage users to enter data in a manner that the designer would not expect.

Listen to Jerry.
 
Though I do agree with Jerry that you should probably review this thought process, you can change how the enter key behaves by going to the Properties of your control, click on the "Other" tab and change the "Enter Key Behavior" to "New Line in Field."
 
This information doesn't neccesarily have to be stored separately. All it is doing is displaying it on a form. It's kinda like a notes section for our technicians. I got a response just like Joe's and that's exactly what I needed. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top