+ Reply to Thread
Results 1 to 5 of 5

Search UserForm After Enter, not click.

  1. #1
    Registered User
    Join Date
    01-05-2007
    Location
    West Chicago
    MS-Off Ver
    2010
    Posts
    12

    Search UserForm After Enter, not click.

    How do I get a user form to search based on the contents of a SearchBox/TextBox when the text is entered and the Enter key is pressed?

    It automaticly starts the SearchBox_Change once I start typing. I know it should not be Change but what should it be?

    I have a user form with two toggles. Tracking number and Store number.
    The StoreButton is True by default so a search will by Store number.

  2. #2
    Forum Contributor
    Join Date
    09-28-2006
    Posts
    122
    try putting the code inthe search box exit event

  3. #3
    Registered User
    Join Date
    01-05-2007
    Location
    West Chicago
    MS-Off Ver
    2010
    Posts
    12
    The procedure will be checking off or processing each line in the list. The user will only be exiting when they are finished.

    We will be using a bar code reader that will have a carriage return at the end of its input. So the user does not have to click on anything and only scan in one item after the other I need it to see the carriage return and process the data, clear the line and be ready for the next request.

    Dave Ó¿Õ

  4. #4
    Registered User
    Join Date
    01-05-2007
    Location
    West Chicago
    MS-Off Ver
    2010
    Posts
    12

    Private Sub TextBox_Exit

    I'm getting closer but it is still not working. This should process the text within the text box once the Focus is taken away.

    The problem is that it will not compile. Please anyone...

    Private Sub TextBox_Exit



    When I do get this to work, how do I give the focus back to the TextBox once the Subroutine is finished.

  5. #5
    Registered User
    Join Date
    01-05-2007
    Location
    West Chicago
    MS-Off Ver
    2010
    Posts
    12

    Private Sub SearchBox_Exit(ByVal Cancel As MSForms.ReturnBoolean)

    I now have the SearchBox working when an enter key is pressed.

    Now how do I get the focus back to the SearchBox?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1