I would suggest that you keep the inventory information in a database (preferably) or some other external file. With a database, you would perform a simple query to return all of the data based on the barcode. NI has the database connectivity toolkit that makes the job pretty simple. If you need to save some money and can get familiar with SQL you can try
LabSQL. Keeping the information in some other external file such as Excel or delimited text can also be done but that solution generally requires you to load the entire file into memory and then use the search array functions. Unless you use some sort of external file, there is no way to keep from modifying the program every time a new item needs to be added. All of the commercial inventory control systems that I've ever heard of use a database.