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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |