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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to vbcrlf when the enter button is pressed?

Status
Not open for further replies.

neemi

Programmer
May 14, 2002
519
GB
Access 2000.

I have a simple form with a text box. I was wondering if anyone knows how I would write code so that when the User press's the enter button a vbcrlf is inserted (a new line is entered) if they have focus on the text box in question, and where I would insert this code.

At the moment when they press enter they are taken to the next control on the form.

Help appreciated.

Cheers

Neemi
 
You need to make sure that the following two properties of your textbox control are set appropriately:
.multiline=true
.enterkeybehavior=true
Do that, and Excel/VBA does the rest.

Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top