Solved! Go to Solution.
This is classic vb string building. Your messagebox looks right because it concatenates the variables together.
Does this work, add "'" (quote, single quote, quote) around your variables. Maybe it's + instead of &, been a long time since I VB'd anything.whereClause = "InspectionDate >= " & "'" & fromDate & "'" & " And InspectionDate <= " & "'" & toDate & "'"