467,877 Members | 1,222 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

Union Query not seen from Excel

Hello,

I made a union query that works perfectly in Access giving me a table that display all my nice records. when I try to retrieve these records in excel by either queriying the database or loading the pivot cash I get problems.

In the first case I see onlt "normal queries" and the Union query is not available for me to pick up. In the second case (loading the pivot cash using MS Query) I can select the union query and pick its fields as if there was no problem (if I try to preview the data it does not work) and when I reach the final step of the wizard it tells me: Too Few Parameters (expected 2).

I tryed everything I know and I looked all over to see if someone could help me.

PLEASE HELP!!!
Nov 7 '06 #1
  • viewed: 19813
Share:
4 Replies
MMcCarthy
Expert Mod 8TB
Hello,

I made a union query that works perfectly in Access giving me a table that display all my nice records. when I try to retrieve these records in excel by either queriying the database or loading the pivot cash I get problems.

In the first case I see onlt "normal queries" and the Union query is not available for me to pick up. In the second case (loading the pivot cash using MS Query) I can select the union query and pick its fields as if there was no problem (if I try to preview the data it does not work) and when I reach the final step of the wizard it tells me: Too Few Parameters (expected 2).

I tryed everything I know and I looked all over to see if someone could help me.

PLEASE HELP!!!
Create a temp table and append all records from the union query. You should be able to retrieve them as normal into access.
Nov 7 '06 #2
Create a temp table and append all records from the union query. You should be able to retrieve them as normal into access.



Hey dude, can you explain me this solution better?? Iīm having the same problem!!!
Jan 5 '07 #3
Hi, If you have a Union Query, just create another normal query from a Union Query and then you are free to use this query in any excel..Trust me this works. Have fun !!!!!!
Oct 1 '10 #4
I have had success using union queries as the data source for excel pivot tables. This success came after much trial and error. I hope my experience is able to help anyone else who needs this functionality.

Rule# 1- Do not use double quotes in your union query anywhere.
It may work in access but it will screw things up in the Jet data engine. It will also cause the "too few parameters" error.

Rule #2- Use ms query to create the pivot table. To do this go to the data tab--> from other sources --> from ms query. Choose ms access database. Select your query and data fields. Import Data into a pivot table.

For some reason union queries are not visible using the insert-->pivot table--> use external data range method.

Tip #1 - you can add your union query to a select query and then add other related data fields to the data set. If you have calculations to make, I advise you to do them in the select query. Calculated fields created inside the pivot table tool are subject to more restrictions.

Good luck

Toom21 (using excel2007+access2003)
Apr 19 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Paradigm | last post: by
2 posts views Thread by M Stery | last post: by
2 posts views Thread by mattytee123 | last post: by
1 post views Thread by forey | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.