[RESOLVED] How to make go textbox next line when hitting enter key?-VBForums
Results 1 to 3 of 3

Thread: [RESOLVED] How to make go textbox next line when hitting enter key?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    20

    Resolved [RESOLVED] How to make go textbox next line when hitting enter key?

    How can I change the textbox behaviour in MS Access form to go to next line within textbox when I hit the enter key? At present when I hit the enter key it goes to next tab location.
    Please help!

    Thanks.

  2. #2
    Addicted Member tsungik's Avatar
    Join Date
    Aug 2004
    Location
    Philippines
    Posts
    194

    Re: How to make go textbox next line when hitting enter key?

    You can insert a code inside the KeyPress Event of the TextBox object. Something like this..

    Private Sub TextBox1_Kepress(.....)
    If KeyCode = 13 then
    NextTextBoxObject.Focus
    End If
    End Sub
    Begin with the end in mind.

    My Profile

    while( !( succeed = try() ) );

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    20

    Re: How to make go textbox next line when hitting enter key?

    Thanks for the suggestion. While searching in properties about 'OnKeyPress', I found a property that exactly fits my question, the property is called 'Enter Key Behaviour' and setting that to 'New Line in Field' did the job. Hope this will be a help for any other new bee like me looking for similiar solution.
    Thanks again.
    Last edited by sprasoon; Aug 23rd, 2007 at 11:32 PM. Reason: Typo correction

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.