[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

Lock pagination word form

I have a word form that I want to post online.  I want people to be able to fill in the txt form fields without creating a new line when they hit enter.  Even when I set number limits on the form field this still doesn't take care of the problem.  I don't want people to be able to create a new line when they hit enter.
0
ksilvoso
Asked:
ksilvoso
  • 2
  • 2
1 Solution
 
Joanne M. OrzechManager, Document Services CenterCommented:
You might want to try using the text boxes found in the VB toolbox rather than on the forms menu.

0
 
ksilvosoAuthor Commented:
How does this work?  I can only type in the box by right clicking on it and selecting edit.  Plus it won't wrap the text.
0
 
dlc110161Commented:
If you use the ActiveX controls, then you can code trap the keypress and stop the enter key.

Dawn Bleuel
Word MVP
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
  If KeyCode = 13 Then
    MsgBox "Sorry, you are not allowed to hit the enter " & vbCr & _
      "key while in this field. Type the details and use the " & vbCr & _
      "TAB key to move to the next field."
  End If
  
End Sub

Open in new window

0
 
Joanne M. OrzechManager, Document Services CenterCommented:
You can also right-click on the control and go to Properties, just change the Multi-Line option to True... it will wrap.
0
 
dlc110161Commented:
I just caught part of your question that I missed earlier. To type in the field, protect the document. With your document protected you should be able to tab from field to field.

Dawn Bleuel
Word MVP
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

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