Reputation: 43
My problem involves the importing of data from a 2 separate Access queries in the same database into 2 different Excel workbooks.
One query works fine, connects to the datasource...great..
But the second query does not work correctly, it only pulls the column headers from the query and not the details.
Firstly, here is the first query that works perfectly fine.
The above query works fine when I connect to it using the "External Source" option in Excel, pulls data, can refresh it and everything.
This is the second query
This query does not work correctly, well, it works fine when you run it inside the database, but as soon as you try and connect to it like the first query, all it does it bring up the column headings but none of the data.
Upvotes: 1
Views: 735
Reputation: 97131
Change the criterion on dbo_Queue.Name
from Like "uk*"
to ALike "uk%"
You didn't say how you're connecting to Access from Excel. Queries run from ADO/OleDb connections require ANSI wild card characters for Like
pattern-matching: %
and _
instead of *
and ?
But my suggestion was to use ALike
instead of Like
because ALike
signals the db engine to always expect ANSI wildcards regardless of where and how the query is run. Therefore the query should return the same result set when run from Excel as it does when run from within an Access session.
Upvotes: 3