sql statement in visual basic

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

Guest

I have a query with the following SQL statement:

SELECT Change_Request.* FROM Change_Request INNER JOIN Subdoc ON
Change_Request.CRID = Subdoc.CRID WHERE (((Subdoc.DocNo) Like "*" & [Enter
Doc Number] & "*")) ORDER BY Change_Request.CRID

I would like to set a RecordSource property in visual basic to this sql
statement but it doesn't work. I think it has something to do with the
quotes in the WHERE part, because everything else works. What can I do?

Thanks!
 
Dear Dahtee:

You've got that right. Double up every double quote within the query. One
double quote ends the string. Two consecutive double quotes puts ONE double
quote into the string.

Tom Ellison
 
Back
Top