sql statement in visual basic

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!
 
T

Tom Ellison

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top