Greetings all, I have had the greatest headache overcoming this problem! I am new to C# and XML. I have an InfoPath 2013 form that gets it data from a SQL table through a data connection. I need to filter the data using wildcards. I have been following Microsoft's directions to accomplish this (http://support.microsoft.com/kb/826992). I made the custom changes to suit my needs and I have followed the code letter for letter. but when I run the code, it crashes right where I enter the text to use in the query. The error message I get is "NullReferenceException was unhandled by user code : Object reference not set to an instance of an object." I have been beating my head against the wall trying to figure this one out. I have searched extensively but nothing is helping. Here is the offending line:
string strPart_ID = xnSuppliersQuery.SelectSingleNode("@Part_ID", this.NamespaceManager).Value;
This is where I grab the value that was entered by the user, assign to a var so I can use it. It seems to not be able to see that I have entered a value and tells me that the node is null. Any help would be greatly appreciated! Screenshot below:

Wakgtech