Hello,

First al ittle background info -

I have written some VBA code to process a CSV file and get it formatted for upload to a database. The CSV file is a Bill of Materials.

Everything works great, but I need to take the functionality a step further - and what I need it to do is definitely beyond my skill level at this time.

The Bill of Materials can be a long list, and sometimes it is a single line. I need my program to check if the item exists in the database line by line, and if not, stop and throw an error.

Here is a sample of the data being sent to the database:

The item I need to check for exists in the 4th column (The first item is 20802 )

1 username E33563-62 20802 EA 2 01/13/2016
2 username E33563-62 43587 EA 3 01/13/2016
3 username E33563-62 R28476 EA 9 01/13/2016
4 username E33563-62 F84756 EA 27 01/13/2016


I think what I need to do is make a loop that will process each line, check the item number against the Item table in the db.