Question
April 8, 2007 at 12:22 AM
dar256

VB Excel Programmer

by dar256 . Updated 19 years, 6 months ago

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 discussion is locked

All Comments