A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How Can I prevent ctrl + enter (carriage return) on a text box?



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2005, 07:03 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How Can I prevent ctrl + enter (carriage return) on a text box?

I don't want users to insert a carriage return on a text box.
In the text box property, there is [Enter Key Behaviour] but [Ctrl + Enter
Key Behaviour].
How can I prevent this?
Help!


  #2  
Old December 7th, 2005, 07:14 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How Can I prevent ctrl + enter (carriage return) on a text box?

Try this in the KeyDown event of the textbox to cancel the entry.

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And (Shift And acCtrlMask) 0 Then
KeyCode = 0
End If
End Sub

--
Wayne Morgan
MS Access MVP


"Aki Nomura" wrote in message
...
I don't want users to insert a carriage return on a text box.
In the text box property, there is [Enter Key Behaviour] but [Ctrl + Enter
Key Behaviour].
How can I prevent this?
Help!



  #3  
Old December 7th, 2005, 07:20 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How Can I prevent ctrl + enter (carriage return) on a text box?

Thank you.
So there is no such a setting then.....

"Wayne Morgan" wrote in message
...
Try this in the KeyDown event of the textbox to cancel the entry.

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And (Shift And acCtrlMask) 0 Then
KeyCode = 0
End If
End Sub

--
Wayne Morgan
MS Access MVP


"Aki Nomura" wrote in message
...
I don't want users to insert a carriage return on a text box.
In the text box property, there is [Enter Key Behaviour] but [Ctrl +
Enter Key Behaviour].
How can I prevent this?
Help!





  #4  
Old December 7th, 2005, 07:28 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How Can I prevent ctrl + enter (carriage return) on a text box?

Not that I know of.

--
Wayne Morgan
MS Access MVP


"Aki Nomura" wrote in message
...
Thank you.
So there is no such a setting then.....



  #5  
Old December 11th, 2005, 01:09 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How Can I prevent ctrl + enter (carriage return) on a text box?

You can also imagine analyzing what the user entered and ignore everything
after the first line break.

Also display a warning message through a message box, reminding the user
that the field in question is "monoline" and that muilti line input is not
wished for. Of course, only display it when the data entered is invalid.
After a few tries the user will stop trying.

:P

Francois

"Aki Nomura" wrote in message
...
I don't want users to insert a carriage return on a text box.
In the text box property, there is [Enter Key Behaviour] but [Ctrl + Enter
Key Behaviour].
How can I prevent this?
Help!



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking text boxes Volunteer Mom Publisher 7 November 12th, 2008 01:29 AM
Is Access even the right idea? BMB New Users 19 November 21st, 2005 08:01 PM
Creating dynamic cross reference links in a Word document torajudo General Discussion 4 October 25th, 2005 03:51 PM
"Distributed" Text alignment in reports - Carriage return...?? Olly Gregory Setting Up & Running Reports 1 January 17th, 2005 01:56 AM
Concatenatd fields in a query for a searching form Marc Running & Setting Up Queries 8 October 19th, 2004 08:49 PM


All times are GMT +1. The time now is 04:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.