M
marronhar
I need to be able to adjust query criteria depending what is chosen on a
form. The field in question is a numeric field (long). I have attempted to
get this to work by using a public function in the criteria window to return
a string that contains what I am trying to restrict my query results to. If
I return a single number, say 12345, I get results for that number. If I
return something like 12345 Or 67890 I will get a datatype mismatch.
I have tried formatting the string like [tablename].[fieldname]=12345 but
datatype mismatch seems to prevail. I have tried changing the datatype of
the public function as a string and as a variant with no change in the
outcome.
Any suggestions?
form. The field in question is a numeric field (long). I have attempted to
get this to work by using a public function in the criteria window to return
a string that contains what I am trying to restrict my query results to. If
I return a single number, say 12345, I get results for that number. If I
return something like 12345 Or 67890 I will get a datatype mismatch.
I have tried formatting the string like [tablename].[fieldname]=12345 but
datatype mismatch seems to prevail. I have tried changing the datatype of
the public function as a string and as a variant with no change in the
outcome.
Any suggestions?