In a vb.net 2010 desktop application that utilizes an Access 2013 database, the user is getting an error message in a popup window when the user select a date range that is not included in the Access 2013 database. The error message says, "Syntax error in date in query expression 'a.InvDate Between ## and ## AND (a.CatId ='30' Or a.CatID = '31''.
Thus is there some sql that I can add to the query to prevent the error message from occurring? What can I do the check if the date range does not exist?
What would you do to solve the problem? Would you show me code and/or point me to a link that will say how to solve my problem?