Using a function as criteria in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a function that returns a string that I would like to use as the
criteria in a field in the QBE query grid. I know the return value for the
function is correct, however the query seems to be treating the whole thing
as a string. For instance, if i pass "H, U" to the function it will return
"like H* or Like U*". So, if i wanted to get specific items I could put
=fItemFilter(Forms!formName!textbox) in the item criteria of the query and
get the desired results. Any sugestions?

Thanks in advance
 
This will not work if your function returns the "Like..." part.

This would work:
Like "*" & MyFunction() & "*"
Where MyFunction() returns a single string value.
 
Back
Top