Search for serial number, pull information, and then submit

  • Edit: So I haven't stopped looking up how to do this but whenever I find anything on it I get lost in how it works and how to implement it properly in my spreadsheet.


    So there is a lot going on in this new userform for my inventory.


    I need to create a userform with code that will allow me to search by serial number (which is typed by the user) and part type which is specified in a combobox which is already set up when the userform initializes:


    Which then sets the worksheet (Which we will be searching in):


    The next part is where the found data will be put, which is text boxes labeled as:

    Code
    textresultmanufacturer
    textresultmodel
    txtresultserialnumber
    textresultvendor
    textresultlocation


    We do not need a list box in this situation since we are going to be searching by a unique number that can only be associated to one part.


    The last part (Which is submitting the data to a different worksheet known as "checking the part out") is something I can code relitively easily, the only part I do not know how to code is the search function.


    Edit (Edit was solved)


    Edit 2: This is now the final code minus the search function:


    forum.ozgrid.com/index.php?attachment/42457/

  • Re: Search for serial number, pull information, and then submit


    Bump,


    Does no one know how to do something like this or did I confuse you all/not follow the rules properly?

  • Re: Search for serial number, pull information, and then submit


    Quote from yegarboy;586672

    Use this instead lol I uploaded the wrong book. I like this search engine better. You will too. forum.ozgrid.com/index.php?attachment/42529/ I was toying with a few ideas.


    That one is not working, I can type S29 and set it to Bill Validator but it does not select the serial numbers with S29 in them

  • Re: Search for serial number, pull information, and then submit


    Thats because its looking for an exact match. Remember...because your not using a Listbox you can not enter a partial search. It must be exact or the code will just guess. HTH

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Search for serial number, pull information, and then submit


    If you want to be able to do that you will need a listbox. Shall i add one?

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Search for serial number, pull information, and then submit


    Ah so unless I am searching for an exact match it will not select anything. It seems that the first one you posted is cycling through the matches which seems to be an unintended affect but one that makes it more convienient for the people that are using this spreadsheet, however the bad part with the first one is it is not isolating to just the serial number field, like if I type a "1" it is also picking up "Rack 1 Shelf 2" or "Rack 2 Shelf 1" etc etc, which is a drawback from not searching for an exact match.

  • Re: Search for serial number, pull information, and then submit


    Yeah i see what you mean..let me try a few quick things.

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Search for serial number, pull information, and then submit


    Other than the issue of the first one not isolating to the serial number field it seems to be good.

  • Re: Search for serial number, pull information, and then submit


    Ok i tweaked it a bit. It will now do partial searches and to make partial searching even better i added a toggle up and down button next to the search button. Search for s77 and after the search loads, press the down button and it goes to the next available s77 row. forum.ozgrid.com/index.php?attachment/42530/ Then if you go past what you wanted it goes back up a row.

  • Re: Search for serial number, pull information, and then submit


    Quote from yegarboy;586681

    Ok i tweaked it a bit. It will now do partial searches and to make partial searching even better i added a toggle up and down button next to the search button. Search for s77 and after the search loads, press the down button and it goes to the next available s77 row. forum.ozgrid.com/index.php?attachment/42530/ Then if you go past what you wanted it goes back up a row.


    It still seems like the first one is going to be the most convenient one if it can be isolated down to cell "C".

  • Re: Search for serial number, pull information, and then submit


    Whats wrong with the last one? Whats it not doing?

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Search for serial number, pull information, and then submit


    Quote from yegarboy;586684

    Whats wrong with the last one? Whats it not doing?


    Nothing is wrong with it really I'm just thinking about the other people that are going to be using this to enter data into the spreadsheet. It is easier if the user only has to hit one button to cycle through the results instead of three. Do you see what I mean?

  • Re: Search for serial number, pull information, and then submit


    The second code is refined to only column "C". It will find the very first cell with your search criteria and has the option to move down or up to dial in what you asked it to search for. Im not understanding.

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Search for serial number, pull information, and then submit


    Quote from yegarboy;586687

    The second code is refined to only column "C". It will find the very first cell with your search criteria and has the option to move down or up to dial in what you asked it to search for. Im not understanding.


    I see what you mean, let me adapt this code into the main entry form, can you add some catches for the debug errors so when it reaches the top result it doesn't error out?

  • Re: Search for serial number, pull information, and then submit


    I understand what you mean. Hold tite.

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Search for serial number, pull information, and then submit


    There isn't a way that im aware of that can run 2 searches at once. Here is what i mean.


    The first time you press the search button it searches for the text. when it finds it, it activates that cell. Then populates the other cells to your form. You cant add a second search from the same button. Pressing it again just repeats the same search. Thats where the spin button comes in. It can move the active cell up or down. It does the exact same thing as the first search with the bonus of control over what you search. I don't see how pressing an extra button is that hard.

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!