baldmosher
New Member
- Joined
- Jul 10, 2009
- Messages
- 32
I have a SELECT query in an Access 2010 ACCDB that I'm trying to load into Excel using either Microsoft Query and/or VBA, whilst applying a WHERE filter to the original Access SELECT query.
What complicates matters is that I have to use * to load all the fields from a crosstab sub-query, because it could be any of 400+ fields in use in the query, and I can't predict when a new field will be added into the data.
So I'm basically trying to load this into an Excel querytable or pivot (either would do but prefer querytable):
SELECT * FROM [qryCrosstab] WHERE [Field1]='ABC'
However, I don't know how to do this.
- Microsoft Query apparently won't let me use * and times out when I try to use it, so that's no good.
- Excel won't let me apply a filter to the Access linked query properties (or will it?) unless I create multiple copies of the same query in the source database with each filtered item (and I'm trying to avoid doing this).
- VBA queries are slightly alien to me, unless I am using the MS Query interface, doing the VBA within Access, or amending someone else's code.
Is this as simple as I think it should be?
Or is it so difficult that I should just deal with the extra workload and create multiple copies of the same query in Access with each [Field1] filter item applied? We're only talking about 10 copies, so not the end of the world to do that.
I always figure there must be an easy solution!!
What complicates matters is that I have to use * to load all the fields from a crosstab sub-query, because it could be any of 400+ fields in use in the query, and I can't predict when a new field will be added into the data.
So I'm basically trying to load this into an Excel querytable or pivot (either would do but prefer querytable):
SELECT * FROM [qryCrosstab] WHERE [Field1]='ABC'
However, I don't know how to do this.
- Microsoft Query apparently won't let me use * and times out when I try to use it, so that's no good.
- Excel won't let me apply a filter to the Access linked query properties (or will it?) unless I create multiple copies of the same query in the source database with each filtered item (and I'm trying to avoid doing this).
- VBA queries are slightly alien to me, unless I am using the MS Query interface, doing the VBA within Access, or amending someone else's code.
Is this as simple as I think it should be?
Or is it so difficult that I should just deal with the extra workload and create multiple copies of the same query in Access with each [Field1] filter item applied? We're only talking about 10 copies, so not the end of the world to do that.
I always figure there must be an easy solution!!