Results 1 to 5 of 5

Thread: Multiline Textboxes and Enter

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    13

    Question

    Hi,
    in my app I got 2 forms, on form1 I got 1 Multiline Textbox and form 2 I got Multiline textboxes. The problem I have is that when I edit text in one of the Textboxes on form2 and press enter the program jumps to the textbox on form1.
    I've tried set.focus, and that didn't help.

    What to do?
    /Tote
    VB6 SP4

  2. #2
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    what do you want it to do?

    If its to go to another control, you need to set the tab order of that other control to be the next one after your text box.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    13
    I want it to do an Enter in the textbox I'm standing in on form2.
    /Tote
    VB6 SP4

  4. #4
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184

    Smile

    Yes, but Enter will fire an event that exits from the text box. Do you want to 'Enter', then stay in the text box?

    If so you will have to check for the Enter key (I think its something like if keyascii = vbEnter, but I'm not sure), then do something with the response like setfocus back to your text box.

    You have to deal with the 'Event', you cannot just press enter and expect it to know what to do

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    13
    Well, it works fine on form1, so I can't see any reason why it should't work on another form. I've tried to disable form1 and and not have it visible when I load form 2, but it'll jump back to form1 anyway.
    Maybe if I delete form1.....
    /Tote
    VB6 SP4

Posting Permissions

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



Click Here to Expand Forum to Full Width