SQL quote marks in report filter (ADP)

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

Guest

I would like to set a Report Filter property to:

CONTAINS(dbo.TifText.Content, ' "tuberculosis" ')

I have no problem adding the above as a WHERE clause in a Query SQL pane
but get error 2021 ("One or more of the operators in the filter expression
is invalid") when I set the Filter via VBA code (using CHR34 and CHR39) or
type it directly into Report properties. Clearly the Report Filter has
problems with the singleQuote+doubleQuote+variable+doubleQuote+singleQuote
that is needed for this full-text CONTAINS query in this ADP project.
Changing the doubleQuote to two single quotes does not work. Any help will
be greatly appreciated
 
Anyone who can type a full-text CONTAINS query into a Report Filter would
have the answer to my question. It is possible to simplify the quotes issue
by using only single quotes and dashes to connect a phrase. For example:

CONTAINS(dbo.TifText.Content, 'fiscal-year-budget')

This works in SQL Server and in the Access SQL query pane but not in the
Report Filter.
 
Back
Top