+ Reply to Thread
Results 1 to 6 of 6

[SOLVED] Forms: wait until textbox string is finished with a return key before a vlookup

  1. #1
    Registered User
    Join Date
    01-04-2004
    Location
    Netherlands
    Posts
    54

    [SOLVED] Forms: wait until textbox string is finished with a return key before a vlookup

    Hiho,

    We want to use a barcode scanner to help with our inventory management.
    When scanning, the scanner actually 'types' in keys followed by the enter key. (i.e. "Big box of bolts")
    With a custom form I want to scan a barcode, then perform a lookup to find item information. (i.e. "These are M10 bolts made from steel")

    Since there are many inventory items, I want minimal use of keyboard and mouse for the operator.
    A custom form will do the job!

    I want to let the barcode scanner fill out a textbox, and then use this value in a lookup to find the other information.

    This is what I do now:
    Please Login or Register  to view this content.
    The problem is, it will do the Vlookup after each entered character that is placed in the textbox. It doesn't wait for the enter key to be pressed to 'confirm' the entry.

    So it doesn't wait for "Big Box Of Bolts" to be entered, it will see "B" and try to look that up.

    How can I make the textbox more patient so it only goes ahead with the lookup after it actually recognizes a text being completed by the enter key?

    Cheers!
    Niels
    Last edited by niels007; 11-13-2018 at 05:28 AM. Reason: Solved!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Forms: wait until textbox string is finished with a return key before a vlookup

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Forms: wait until textbox string is finished with a return key before a vlookup

    not quite sure what syntax you are using
    but it seems like your using the TEXTBOX change event

    maybe use a Keydown (or Keyup) event instead
    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,912

    Re: Forms: wait until textbox string is finished with a return key before a vlookup

    Or you could try the AfterUpdate event.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    01-04-2004
    Location
    Netherlands
    Posts
    54

    Re: Forms: wait until textbox string is finished with a return key before a vlookup

    Thanks for the replies people!

    I wanted to avoid uploading files and making it too complicated, in case somebody like bakerman2 came along with the perfect 7 word sentence.

    Thanks everybody for being here and being so patient towards the less able! :-)

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,912

    Re: [SOLVED] Forms: wait until textbox string is finished with a return key before a vlook

    Glad to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Only run VLookup when all data is finished?
    By taylorsm in forum Excel General
    Replies: 1
    Last Post: 09-27-2016, 10:33 AM
  2. VBA code to return 2 vlookup values into 1 textbox on userform
    By gemnnsw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2016, 10:52 AM
  3. [SOLVED] How to set Vlookup from a string of text in a cell and return the same manner
    By cathchin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-14-2012, 04:14 AM
  4. Replies: 3
    Last Post: 01-04-2012, 01:32 PM
  5. Replies: 2
    Last Post: 12-31-2011, 06:41 AM
  6. Return a text string when the result of VLOOKUP formula is #N/A
    By jeremy nickels in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2006, 12:30 PM
  7. [SOLVED] Wait until MSQuery Refresh finished
    By ChrisR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2005, 01:05 PM

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