I have an MS Access DB. I am writing an app in VB.net that queries the DB. The app contains three input fields. and outputs the results into a dataset. I want the user to be able to enter any value (or no value) into any field and get results matching the criteria entered. If the user does not enter anything into a field, I am passing % on as wildcard for that field and appending % to any value entered into a field. In my SQL Query Builder, this works great if I only state WHERE [condition] AND [condition]. I can use any two of the three criteria and get results. However, if I try WHERE [condition] AND [condition] AND [condition], I do not get any results. Your example may be a good idea, but unfortunately, I do this very rarely and do not quite understand you.
I think I know what's going on. Some of my entries contain an empty field. One entry may not contain a Phone #, while other entries may not contain a DOB. If I am selecting a person who contains an empty field, I do not get any results. How can I get around this?