VB Excel Programmer

By dar256 ·
I need to pass a variable to SQL using VB6 in Excel. What am I doing wrong? Code as follows:
Dim stri as String
stri = "12345"
"SELECT * "FROM TABLE" & Chr(13) & "" & Ch(10)& "WHERE (INV_TABLE.INVOICE_NUMBER='stri')")

Does not recognize 12345 in stri.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums