Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL failing in VBA but not on the DB

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
I have a query that works in DBArtisan(DB connection and management software) but not in my VBA code.

In my VBA code I get the error:

Invalid column name "E".

My sql is a bit like this

select * from table where myLookup in ('A','B','C','D', 'E')

If I change it to select * from table where myLookup in ('A','E') it works fine...

I am using ADODB.

Any ideas?

Thanks,

Chris


 
My post is wrong. Please ignore and apologies. I should be using ' instead of " Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top