Realizing this is not a VB help forum I need to understand how to pass a "No record found." from the SQL to the VB. Note: I am not specifically looking for VB help.

Basically, the IF statement will be changed as required but I need some way to check a specific entry with the loadnumber of yyyy000 ( ex. 2018000) and if it does NOT exist, then send up an alertbox.

Do not get too overly excited over the IF statement as it is something I copied from another sub as a place holder.

I tried using a few various methods having no success. I simply need the SQL to return something (a 1 or 0 possibly, or True/False) that can be used in the IF statement to pop a msgbox if the record does not exist.

I'm not trying to insert anything into the table until it's proper time.

Re: ROWCOUNT: I tried that but need to pass a 1 or a 0 or conversely, true/false into the VB. This is where I am struggling. Not sure how to take a "not found" response and convert it to a usable response in the VB part of the code.