discogs
asked on
sql vba excel 2010 ado query syntax
Hello EE,
I am having an issue getting my records out of an table in excel 2010 using ado.
This statement returns 146 records fine:
As soon as I add some criteria, it does not:
Anyone got the solution? Its got me stumped!
TA
I am having an issue getting my records out of an table in excel 2010 using ado.
This statement returns 146 records fine:
rst.Open "SELECT [IndexKey], [Details], [Name], [Amount], [Name] FROM [tbl_import] ORDER by [Name]", cnn, adOpenStatic
As soon as I add some criteria, it does not:
rst.Open "SELECT [IndexKey], [Details], [Name], [Amount], [Code] FROM [tbl_import] WHERE ((([Code]) Is Null)) ORDER BY [Name]", cnn, adOpenStatic
Anyone got the solution? Its got me stumped!
TA
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your response.
Interesting points you make. I ran a test against the cell and realised that there is a formula inside there which is why its not returning any records.
Thanks for the tip, I am going to have to approach this a different way.
TA